Skip to content

Commit

Permalink
Add slides for TCTAG22, PrimeAcademy22, JavaMN22 (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
ghorbanzade authored Jun 18, 2022
1 parent 31a2215 commit 10338af
Show file tree
Hide file tree
Showing 44 changed files with 8,114 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ Pejman is interested in problems related to the design and maintenance of softwa
- [LinkedIn](https://linkedin.com/in/ghorbanzade)
- [Website](https://pejman.dev)

## Upcoming Talks
## Previous Talks

> [Playlist of recorded talks on YouTube](https://www.youtube.com/playlist?list=PL5-_QXYHJoVR99sDXo56_EFaIY4TE5rYj)
### May 12, 2022

Expand All @@ -26,10 +28,6 @@ Building Developer-Friendly Command-Line Tools in Python

- [Registration Link](https://www.meetup.com/PyMNtos-Twin-Cities-Python-User-Group/events/285705542/)

## Previous Talks

> [Playlist of recorded talks on YouTube](https://www.youtube.com/playlist?list=PL5-_QXYHJoVR99sDXo56_EFaIY4TE5rYj)
### May 5, 2022

Chicago Java User Group
Expand Down
2 changes: 2 additions & 0 deletions slides/javamn22/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# for pnpm
shamefully-hoist=true
5 changes: 5 additions & 0 deletions slides/javamn22/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Java MN User Group

"Continuous Regression Testing in Java", Pejman Ghorbanzade, March 15, 2022

- [Registration Link](https://www.meetup.com/Java-User-Group-Hosted-by-TEKsystems/events/284076315/)
37 changes: 37 additions & 0 deletions slides/javamn22/components/Counter.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<script setup lang="ts">
import { ref } from 'vue'
const props = defineProps({
count: {
default: 0,
},
})
const counter = ref(props.count)
</script>

<template>
<div flex="~" w="min" border="~ gray-400 opacity-50 rounded-md">
<button
border="r gray-400 opacity-50"
p="2"
font="mono"
outline="!none"
hover:bg="gray-400 opacity-20"
@click="counter -= 1"
>
-
</button>
<span m="auto" p="2">{{ counter }}</span>
<button
border="l gray-400 opacity-50"
p="2"
font="mono"
outline="!none"
hover:bg="gray-400 opacity-20"
@click="counter += 1"
>
+
</button>
</div>
</template>
15 changes: 15 additions & 0 deletions slides/javamn22/global-bottom.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<template>
<footer class="absolute bottom-0 py-4 px-8 w-full">
<div class="flex justify-between items-center text-blue-400 text-sm font-medium font-mono">
<a href="https://twitter.com/heypejman" target="_blank" title="Pejman on Twitter">
@heypejman
</a>
<div v-if="$slidev.nav.currentLayout !== 'cover'">
{{ $slidev.nav.currentPage }}
</div>
<a href="https://touca.io" target="_blank" title="Tocua Website">
touca.io
</a>
</div>
</footer>
</template>
14 changes: 14 additions & 0 deletions slides/javamn22/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"private": true,
"scripts": {
"build": "slidev build",
"dev": "slidev --open",
"export": "slidev export"
},
"dependencies": {
"@slidev/cli": "^0.28.10",
"@slidev/theme-default": "*",
"@slidev/theme-seriph": "*"
},
"name": "slidev"
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
217 changes: 217 additions & 0 deletions slides/javamn22/slides.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,217 @@
---
theme: seriph
class: ""
highlighter: shiki
lineNumbers: false
info: Continuous Regression Testing in Java
drawings:
persist: false
layout: cover
background:
---

# Continuous Regression Testing in Java

## Java MN Meetup, March 2022

Pejman Ghorbanzade

<style>
h1 {
font-size: 3rem !important;
}
</style>

---

Intro

# Format...

- Interactive
- Hands-on Live Coding
- Ask questions any time

<style>
li {
font-size: 1.25em;
}
</style>

---

# Agenda

- Motivation
- Snapshot Testing
- Regression Testing
- Continuous Testing

<style>
li {
font-size: 1.25em;
}
</style>

---

# About Me

<div grid="~ cols-2 gap-4">
<div>

- Professional Software Engineer
- Canon Medical Informatics
- VMWare Carbon Black
- Working full-time on touca.io
- Continuous Regression Testing
- Passionate about maintaining software at scale

</div>
<div>

<div class="flex justify-center h-80">
<img border="rounded" src="/img/showcase-global-illumination.jpg" />
</div>

</div>
</div>

---
layout: center
---

The Problem

# How can we refactor half a million lines of code without causing any side effects?

---

Motivation

# Candidate Solution A

```java
Output newOutput = newSystem(testcase);
Output oldOutput = oldSystem(testcase);
compare(newOutput, oldOutput);
```

<div class="h-10" />

## Disadvantages

- Test is difficult to setup
- Test system is inefficient to run
- Test system is not reusable

---

Motivation

# Candidate Solution B

```java
Output newOutput = newSystem(testcase);
File newFile = writeToFile(testcase, newOutput);
File oldFile = findOldFile(testcase);
compare(newFile, newOutput);
```

<div class="h-10" />

## Disadvantages

- Dealing with files is no fun
- Test system is hard to maintain
- Test system is not reusable

---

Motivation

# Candidate Solution C

```java
final Output newOutput = newSystem(testcase);
final Description newDescription = describe(testcase, newOutput);
submit(testcase, newDescription);
```

<div class="h-10" />

## Disadvantages

- Limited customization
- Overkill for small projects
- Requires remote computing resources

---

Motivation

# Simple Example

```java
public record Student(
String username,
String fullname,
LocalDate dob,
double gpa
) {}

public static Student findStudent(final String username) {
// ...
}
```

---

Motivation

# High-level API

```java
import io.touca.Touca;

public final class StudentsTest {

@Touca.Workflow
public void findStudent(final String username) {
Student student = Students.findStudent(username);
Touca.assume("username", student.username);
Touca.check("fullname", student.fullname);
Touca.check("birth_date", student.dob);
Touca.check("gpa", student.gpa);
}

public static void main(String[] args) {
Touca.run(StudentsTest.class, args);
}
}
```

---

Motivation

# Design Requirements

- Intuitive developer experience
- Intrinsic support for common types
- Must support integral types, fractional types, Strings, Iterables,
and other common standard types
- Extensible design to support user-defined types
- Must allow users to introduce logic for handling custom types

---
layout: center
---

# Questions

- https://github.com/trytouca/touca-java
- https://touca.io

- https://twitter.com/heypejman
- [pejman@touca.io](mailto:pejman@touca.io)
Empty file added slides/javamn22/styles/base.css
Empty file.
2 changes: 2 additions & 0 deletions slides/javamn22/styles/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import "./base.css";
import "./layout.css";
Empty file.
Loading

0 comments on commit 10338af

Please sign in to comment.