~/talk

Property-based Thinking

Talkat Craft Conference 2023 · 2023-05-18..05-19· [testing, developer-experience]
slides:none on file

Demonstrates using property-based testing with Hypothesis (Python) to write invariants instead of example-only tests, generating 100 generated examples of lists to inspect distributions (the run shows ~86% unique lists, 12% duplicates) and catching a NaN-sort case. Builds a stateful model with a rule-based state machine for a counter, reproduces the exact transition sequence that breaks the invariant (decrement below zero, and later exceeding a 20 limit), and shows iterating generators and assertions until the model matches domain reality.

AI-written summary · about

  1. 0:00Property-based thinking
  2. 1:02Property-based testing
  3. 3:07Problem to software changes
  4. 9:50Testing by example falls short
  5. 13:40Properties and invariants
  6. 16:32Property-based test model
  7. 21:29Floats and edge cases
  8. 23:36Lessons from property-based testing
  9. 26:39Stateful models and state machines
  10. 33:04Challenges and benefits
  11. 37:00Complementary tool
  12. 38:26Happy paths and edge cases
  13. 39:11Closing thoughts
~/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.