theme | class | highlighter | lineNumbers | info | drawings | layout | background | |
---|---|---|---|---|---|---|---|---|
seriph |
shiki |
false |
Continuous Regression Testing in Java |
|
cover |
Pejman Ghorbanzade
<style> h1 { font-size: 2.5rem !important; } </style>- Interactive
- Hands-on Live Coding
- Ask questions any time
- Motivation
- Snapshot Testing
- Regression Testing
- Continuous Testing
- 6 Years of Experience
- VMWare Carbon Black
- Canon Medical Informatics
- Working full-time on touca.io
- Continuous Regression Testing
- Passionate about maintaining software at scale
::right::
- Programming
- Theoretical problem solving
- Like sport
- Software Engineering
- Problem solving within business constraints
- Like gardening
Software Engineering is programming integrated over time
::right::
- Think like an engineer
- Civil engineering: Building a house
- Software engineering: Building with mud
Software is a tractable medium.
::right::
- Good tests are:
- Cheap to Write
- Easy to Read
- Fast to Run
- Easy to Change
Good tests have high return on investment.
::right::
Finding bugs after deployment | 💰💰💰💰💰 |
Finding bugs before release | 💰💰💰 |
Finding bugs during QA testing | 💰💰 |
Finding bugs during code review | 💰 |
Finding bugs during development |
It takes 23 days for software engineers to gain confidence that a given code change works as they expect.
The Problem
Motivation
Output newOutput = newSystem(testcase);
Output oldOutput = oldSystem(testcase);
compare(newOutput, oldOutput);
- Test is difficult to setup
- Test system is inefficient to run
- Test system is not reusable
Motivation
Output newOutput = newSystem(testcase);
File newFile = writeToFile(testcase, newOutput);
File oldFile = findOldFile(testcase);
compare(newFile, newOutput);
- Dealing with files is no fun
- Test system is hard to maintain
- Test system is not reusable
Motivation
final Output newOutput = newSystem(testcase);
final Description newDescription = describe(testcase, newOutput);
submit(testcase, newDescription);
- Limited customization
- Overkill for small projects
- Requires remote computing resources
Motivation
public record Student(
String username,
String fullname,
LocalDate dob,
double gpa
) {}
public static Student findStudent(final String username) {
// ...
}
Motivation
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
- 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