If you’ve ever written some tests, or discovered that tested code can still have bugs, this tutorial is for you. Hypothesis lets you write tests that should pass for every case… then finds bugs by generating inputs you wouldn’t have looked for. Even better, you get to save time by writing fewer but more powerful tests, so this process improves your productivity as well as your code!
- Learn what property-based testing is, and how it relates to other kinds of tests!
- Write your first property-based test, with example code and an overview of common tactics!
- Describe inputs - use and compose strategies, then define your own or infer them from other code!
- Use hypothesis.stateful to generate and test whole programs
- Get the low-down on Hypothesis: performance tips, debugging tools, and more!
You’ll be ready to find real bugs by half way through the tutorial; and by the end you’ll be ready to use Hypothesis in ways we never imagined.
There will be dedicated time for Q&A about applying Hypothesis (or PBT ideas) in your domain, testing anything from web apps to big data pipelines to other languages, before you leave to drag the world kicking and screaming into a new and terrifying age of high quality software.