Overview
Discover the power of property-based testing in this 53-minute conference talk from NDC Conferences. Learn how to write thousands of tests efficiently and uncover edge cases in your code. Explore the differences between example-based testing methods like TDD and BDD, and the property-based approach that runs a single test hundreds of times with randomly generated inputs. Gain insights into documenting code behavior under various conditions, understanding best practices, and implementing property checks. Follow along as the speaker demonstrates practical examples, including addition and multiplication properties, compound types, and shrinking techniques. Delve into model-based testing, verification, and real-world applications. By the end of this talk, acquire a powerful new technique to add to your testing toolbelt and improve your overall code quality.
Syllabus
Intro
Story
TDD best practices
Enterprise Developer from Hell
How would you write this
Propertybased testing
Adding and multiplication
Adding and zero
Property check
Review
Addition
Evil and lazy
QuickCheck
Compound types
Shrinking
Properties
Verification
Modelbased testing
John Hughes example
Example vs Probably based tests
Resources
Outro
Taught by
NDC Conferences