PyLadiesCon 2024

Enhance Your Tests With Property-based Testing
2024-12-07 , Main Stream
Language: English

Writing tests can be difficult, especially when there are many edge cases to consider. Even if you plan out a matrix of edge cases, you may still struggle to work your way through each case. These are some of the limitations with example-based testing.

This talk will describe an approach called property-based testing and walk through a code example with a sort function. It will show how to validate your program’s behavior to more closely match the software specifications, and avoid having a program that happens to pass or fail just a few fixed examples. It will show how to leverage generators to achieve this at scale.

After watching this talk, you’ll be able to apply property-based testing to achieve more robust code and a new level of efficiency in your software development.

I'm a software developer who is interested in data, automation, and testing frameworks.