~/talk

Property-Based Testing

Talkat NDC Oslo 2023 · 2023-05-22..05-26· [testing, developer-experience]
name:Lucy Mair
links:none on file
slides:none on file

Property-based testing uses concrete properties (for all X satisfying preconditions some predicate holds) and generators to find edge cases automatically, running FSCheck (defaults to ~100 inputs and shrinking to a minimal failing case) against code like list reverse, random-element removal, custom serializers, or refactor comparisons. A real codebase example grows FSCheck references from 74 to 129 (≈50% increase) and found issues even in JS tooling via fast-check (e.g. strict equality edge cases), making it easy to catch runtime exceptions and subtle logic errors.

AI-written summary · about

  1. 0:00Introduction
  2. 2:05What is property-based testing
  3. 7:58Unit tests vs list reversal
  4. 12:46How property-based testing works with FsCheck
  5. 18:25Five practical scenarios
  6. 24:30Serializer testing
  7. 25:53Finding exceptions
  8. 26:33Valid output ranges
  9. 27:36Real-world adoption
  10. 30:52Complex type support
  11. 34:52FsCheck with C#
  12. 35:13Performance implications
  13. 37:18Compiler vs runtime errors
  14. 41:14Testing pyramid placement
  15. 42:40Early error catching
  16. 44:02When not to use
  17. 46:30Conclusion
~/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.