Overview
This course on Introduction to Property-Based Testing aims to teach learners the following:
- Understand the concept of property-based testing and its advantages over example-based testing.
- Gain proficiency in using the Hypothesis property-based testing library.
- Learn how to define and enforce robust properties in code.
- Acquire practical experience in identifying real bugs through property-based testing.
The course covers individual skills such as:
- Utilizing Hypothesis library for property-based testing.
- Defining input strategies and writing generalized tests.
- Identifying bugs that may not be caught by traditional testing methods.
The teaching method involves a combination of theoretical explanations, practical exercises, and a live demo to illustrate the concepts taught.
The intended audience for this course includes software developers, testers, and anyone interested in improving their testing practices by adopting property-based testing techniques.
Syllabus
Introduction
What is testing
Summary
Exercises
Overview
Scale
Methods
Map and Filter
Just and sampled from
One and nothing
Build strategy
Recursive
Inferring strategies
Special strategies
Inner composite trick
Data strategies
Where to find them
Recap
Test Tactics
Common Properties
Round Trips
Equivalent Functions
Validate Output
Local assertions
Hypothesis
Metamorphic Relations
Metamorphic Functions
Conclusion
Live Demo
Taught by
PyCon US