Generative Testing: Properties, State and Beyond
summary
Demonstrates using Clojure test.check (gen/sample, such-that) to run 1,000 random trials and catch a divide-by-zero and a floating-point equality failure (example inputs 23 and 21), then uses shrinking to produce minimal failing cases; shows a real rewrite at Stylefruits where a single property-based testing property uncovers many routing regressions; introduces stateful testing with the states library (commands/run-commands, model vs. system) to find a conjoin/pop bug; points to Jepsen-style concurrent sequences for automated race-condition detection.
AI-written summary · about
chapters (13)
- 0:00Introduction
- 0:35Testing culture
- 0:57Why test things automatically
- 1:37Example Division
- 3:12QuickCheck
- 4:14TestsCheck
- 5:39Generator
- 8:38Reverse
- 9:20Reverse Implementation
- 15:25Use Cases
- 17:25State
- 19:05Example
- 30:13Conclusion
related talks
25mPowerful Testing with test.check
26mThe missing piece of testing
20mUnlock The Power Of Property-Based Testing
36mTesting Stateful and Concurrent Systems Using test.check
33mLets Generate Tests
23mProperty based testing is a mindset
54mAn Introduction to Property-based Testing
46mTesting in the world of Functional Programming
