Testing Web Services with QuickCheck
summary
Property-based testing uses QuickCheck to auto-generate millions of requests from JSON schema generators and also emit a validator, then exercise real endpoints (tries Phoenix locally and targets the XC currency converter). Results include a Unicode reverse failure exposed by shrinking, a forbidden Swedish krona returned despite schema enums, a zero-vs-exclusiveMinimum bug in conversions, and timestamp race failures; at scale QuickCheck tooling finds subtle protocol bugs (20k lines of QuickCheck testing about 1M lines of C revealed several real defects).
AI-written summary · about
chapters (17)
- 0:00Intro
- 0:17Erlang background
- 2:13Why is testing hard?
- 5:22Specify properties
- 11:58Running QuickCheck
- 12:52Property Based Testing
- 21:31JSON schema generators
- 23:24Test a currency web servicel
- 24:35Test a currency web service!
- 26:00Type correctness
- 27:25Found the type error!
- 28:33Type specification tested
- 33:47Run the same check again
- 35:48Web service testing
- 36:34Currency at a given time
- 38:37Combine JSON and QuickCheck Q
- 40:07Conclusion
related talks
53mProperty Based Testing, By Example
41mQuickCheck Mini for Elixir
30mProperty-based Testing for Godly Tests
51mProperty Testing: Write Fewer Tests, Find More Bugs
39mPROWESS: Property-Based Testing for Web Services
18mProperty-based testing beginning with SwiftCheck
51mProperty-Based Testing
36mProperty Based Testing: From Theory to Practice
