-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add slides for TCTAG22, PrimeAcademy22, JavaMN22 (#11)
- Loading branch information
1 parent
31a2215
commit 10338af
Showing
44 changed files
with
8,114 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# for pnpm | ||
shamefully-hoist=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import "./base.css"; | ||
import "./layout.css"; |
Empty file.
Oops, something went wrong.