~/talk

Introduction to Property Based Testing

Talkat PyCon US 2022 · 2022-04-27..05-03· [testing, python]
slides:none on file

Property‑based testing claims that specifying invariants rather than cases uncovers real edge‑case failures: Hypothesis drives generation (default ~100 examples) and shrinking to minimal counterexamples, finds Unicode decode and datetime parsing bugs (year/month swap), catches subtle divide/zero and Mercurial encode/decode failures, and surfaces misunderstandings of library contracts. The tooling includes pytest integration and a test generator hypothesis write that scaffolds useful tests. Common effective properties are round‑trips and does not raise an exception checks; metamorphic tests even expose hundreds of compiler bugs.

AI-written summary · about

  1. 0:00Start
  2. 1:41What Is Testing
  3. 3:49Sorting
  4. 8:38Property-Based Testing
  5. 10:10Advantage of Property-Based Testing
  6. 17:32Mercurial
  7. 19:51Collections
  8. 20:18List Strategy
  9. 20:54Tuples Strategy
  10. 23:00Map Strategy
  11. 27:53Json Strategy
  12. 30:01Regular Expression Support
  13. 37:12Live Demo
  14. 40:56Common Test Tactics
  15. 41:38Round Trip Properties
  16. 42:30Ramp Trips
  17. 45:00Validate the Output
  18. 45:31Mathematical Properties
  19. 45:58Stateful Testing
  20. 46:43Metamorphic Relations
  21. 47:05Metamorphic Testing
  22. 49:35Exercises
  23. 53:15Gzip Compression
  24. 1:03:26Custom Strategies
  25. 1:04:46Debugging
  26. 1:08:35Random Number Generators
  27. 1:12:27Target Function
  28. 1:14:15Continuous Deployments
  29. 1:14:49Q a Exercises
  30. 1:20:03How Do You Migrate an Existing Test Suite
  31. 1:22:41Testing Machine Learning Code
  32. 1:23:46Schema Thesis
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.