Property-based testing beginning with SwiftCheck
summary
Introduces property-based testing in Swift using the open-source SwiftCheck framework, showing concrete runnable properties like a reverse function’s length invariance and that reversing twice yields the original, with the framework running ~100 random cases and reporting failures. Demonstrates shrinking to minimize failing examples and applies the technique to real examples: verifying maze generators are solvable, testing encode/decode roundtrips, and comparing fast vs slow implementations for equal outputs.
AI-written summary · about
chapters (6)
- 0:00Introduction
- 1:28Property-based testing
- 6:31SwiftCheck basics
- 9:11SwiftCheck keywords
- 12:13Testing examples
- 16:25Summary
related talks
27mAn introduction to property based testing
51mProperty-Based Testing
47mProperty-Based Testing
36mProperty Based Testing: From Theory to Practice
01h 00mA New Approach to Testing with ScalaCheck / Property Based Testing
53mProperty Based Testing, By Example
25mPowerful Testing with test.check
30mProperty Based Testing: From Theory to Practice
