Modernising J-Unit with Test Data Generators
summary
Shows how to replace brittle fixtures with three concrete tools and concrete numbers: DataFaker creates localeed realistic data with 250+ providers and powered a demo that generated 100,000 accounts; Instancio fills deep object graphs and respects JSR‑380 validations; jqwik runs ~1,000 examples, shrinks failures to the minimal counterexample, and supports seeds to reproduce flaky failures. Covers customizing generators for ranges, sizes and conditional rules and warns that huge volumes (eg 10,000 valid emails) can be slow in CI.
AI-written summary · about
chapters (19)
- 0:00Introduction to talk
- 0:23Why test data matters
- 1:08Three pillars of test data
- 2:57Example based testing
- 4:46Limitations of static data
- 6:35Benefits of randomness
- 6:57Introducing Data Faker
- 9:26Instantio for large objects
- 11:57From example to property testing
- 13:19What is a property
- 14:41Introducing jQuick
- 15:46Key features of jQuick
- 17:11Customizing data generation
- 18:18Shrinking in property testing
- 19:45Benefits of property testing
- 20:29Patterns for properties
- 22:14When to use each approach
- 22:58Caveats and performance
- 23:39Closing and Q&A
related talks
47mManaging Testing Data
49mManaging Testing Data
41mA Cookbook for Testing Data
43mTesting: Property-based testing - let your testing library work(...)
49mElias Nogueira: Datafaker: The Most Powerful Fake Data Generator Library
21mProperty-based testing - let your testing library work for you
49mJava's Hidden Gems: Tools and Libraries
55mNext-Gen Testing Tools for Java
