"Writing tests first forces you to think about the problem you're solving. Writing property-based tests forces you to think way harder." @jessitron
This is a simple workshop for teaching property based testing.
The goal of this workshop is to give you an introduction to property-based testing, as well as show you how & why you might use it instead of (or in conjuntion with) other testing techniques. We'll be doing this by showing common TDD techniques such as triangulation and then using a property-based testing to achieve the same goals.
The ScalaCheck documentation page lists a number of good resources for getting started with property based testing. In particular I found these useful:
- How I learned to stop unit testing and love property-based testing - Charles O'Farrell, YOW! LambdaJam 2015 (slides);
- ScalaCheck User's Guide
- PropEr Testing
This workshop is available for several languages:
- Scala;
- Swift - see SwiftCheck & Fox;
- Ruby - see Propr.