Test faster, fix more
summary
Introduces property based testing with Hypothesis for Python, generating thousands of inputs (lists, datetimes, floats, strings, Swagger-driven APIs) and using shrinking to produce minimal failing examples. Demonstrates a real bug where identity vs equality on short strings lets a bank match a buyer to themself and shows the fix (use != not is). Mentions stateful testing (rule-based state machines), local failure storage, and using property tests to compare implementations and catch subtle timezone and negative-ID bugs.
AI-written summary · about
chapters (13)
- 0:00Introduction
- 1:10Who am I
- 2:24Outline
- 3:57What is propertybased testing
- 6:44Quick cheat sheet
- 8:59Hypothesis
- 11:36Minimal Usage
- 14:03Examples
- 15:04Strategies
- 17:17Stateful testing
- 18:49Demo
- 22:14Testing
- 27:57Conclusion
related talks
41mProperty Based Testing with Hypothesis: Stronger Tests, Less Work
27mTesting Beyond Examples: Property Based Testing with Hypothesis
50mProperty based testing with Hypothesis
41mProperty Based Testing in Python with Hypothesis
01h 31mIntroduction to Property-Based Testing
01h 23mIntroduction to Property-Based Testing
17mStop Writing Tests!
32mMore testing with fewer tests
