An introduction to property based testing
This page contains links to the slides and code from my talk “An introduction to property based testing”.
Here’s the blurb for the talk:
We are all familiar with example-based testing, as typified by TDD and BDD. Property-based testing takes a very different approach, where a single test is run hundreds of times with randomly generated inputs.
Property-based testing is a great way to find edge cases, and also helps you to understand and document the behaviour of your code under all conditions.
This talk will introduce property-based testing and show how it works, and why you should consider adding it to your arsenal of testing tools.
This talk is based on my blog posts on this topic:
Or an older version with better sound (Click image to view video - free registration required)
Slides from Functional Programming eXchange, Jun 11, 2015
Here are some links to some other talks on property-based testing and functional testing in general.
- John Hughes: Race Conditions, Distribution, Interactions–Testing the Hard Stuff and Staying Sane
- Jessica Kerr: Property-based Testing for Better Code
- Pluralsight course by Mark Seemann: Introduction to Property-based Testing with F#
- Mark Seemann: Look, No Mocks! Functional TDD with F#
There are lots and lots of other good ones as well – just search the net for “property-based testing.”