Wrapping Up
Through properties-driven development, we’ve extrapolated properties from a vague spec, testing our happy paths in a test-first approach. Code coverage, while a useful metric to show code is tested, isn’t great to assess test quality. Instead, you’ve seen how negative testing in a fuzzing-inspired approach can help, as well as how playing with properties by relaxing constraints can uncover all kinds of bugs and underspecifications that could prove problematic.
We’ve done all this while going through the most complex generators this book contains. You should now have a pretty good idea of what can and can’t be done well with stateless properties. Most of your unit testing needs should now be covered, in fact. Go ahead and try a bunch ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access