~/talk

Writing bulletproof code with property-based testing

Talkat droidcon Berlin 2022 · 2022-07-06..07-08· [testing, engineering-leadership]
slides:none on file

Shows how property-based tests replace hand-picked cases with 1,000 semi-random examples by default and catches bugs missed by examples (uppercase-regex error found). Demonstrates jqwik and Kotest, jqwik’s shrinking to a minimal counterexample and seed-based reproducibility, and builds a stateful test for a text editor that simulates random sequences of edits/undo/redo (limits: 20 undos) to verify invariants. Notes tradeoffs: harder to find properties and slower runs, best for utility logic and edge-case coverage.

AI-written summary · about

  1. 0:00Introduction to testing
  2. 1:56Example based testing explained
  3. 8:04Problems with example tests
  4. 9:05Property based testing intro
  5. 13:21Choosing a PBT framework
  6. 14:03Writing first property test
  7. 16:31Understanding jQuick reports
  8. 20:03Edge cases and shrinking
  9. 21:49Stateful testing explained
  10. 31:09Pros and cons of PBT
  11. 39:23When to use property tests
~/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.