Unlocking the Power of Property-Based Testing
Day 1 | 12:55 | 00:15 | UD6.215 | Merlin Pahic
Note: I'm reworking this at the moment, some things won't work.
Most developers approach unit testing by manually defining specific examples to verify the expected behaviour. With this approach, catching all the edge cases can be tricky – or tedious.
Property-based testing offers an alternative, by emphasizing general properties or rules that should hold true across a wide range of inputs. By automatically generating test cases, property-based testing provides broader coverage and can uncover issues that are difficult to find with conventional techniques.
In this talk, we'll explore property-based testing, breaking down how it works and when to use it. We'll cover:
- Core principles of property-based testing and how it differs from example-based approaches.
- Practical techniques for identifying useful properties in various domains, including algorithms, data structures and APIs.
- Tools and libraries that enable property-based testing in popular programming languages.
- Real-world examples of how this approach has uncovered critical bugs and improved test coverage.
This session is designed for developers curious about expanding their testing toolbox. Whether you're new to property-based testing or looking for ways to apply it in your work, this talk will provide practical guidance and resources to help you get started.