Property-based testing:You won't look at your tests the same way ever again
summary
Property-based testing generates large volumes of automatic inputs, finds edge cases and shrinks failures to a minimal counterexample, and runs configurable iterations (defaults around 100, runnable overnight). JVM tooling examples include junit-quickcheck and QuickTheories. A concrete win is refactoring an ecommerce URL serializer where the encode-parse cycle property caught regressions repeatedly. The approach also models stateful and concurrent systems by generating event sequences, comparing against a HashMap oracle, and surfacing race conditions that example-based tests miss.
AI-written summary · about
chapters (13)
- 0:00Introduction
- 1:05Why we test software
- 3:09Testing fitness tracking logic
- 5:51Property-based testing explained
- 7:39Generators in Java libraries
- 8:46Finding edge cases automatically
- 11:59Test-driven development with properties
- 17:22E-commerce URL parsing example
- 22:33Testing stateful systems
- 28:20Concurrent stateful systems
- 34:08Jepsen and distributed databases
- 36:24Advantages of property-based testing
- 38:57Q&A session
related talks
30mProperty Based Testing: From Theory to Practice
51mProperty-Based Testing
51mProperty Testing: Write Fewer Tests, Find More Bugs
58mProperty Based Testing: Concepts and Examples
01h 24mIntroduction to Property Based Testing
45mProperty based tests for the masses
36mProperty-Based Testing: Unveiling the Truth on Test Reduction
47mProperty-based Testing or the Insufficiency of Unit Tests
