~/talk

Less Boring Tests - An Introduction to Property-Based Testing

Talkat DDD Perth 2023 · on Tuesday, 2023-10-10· [testing, functional-programming]
links:none on file
slides:none on file

Property-based testing is shown using FsCheck with xUnit to generate hundreds of inputs (default run tries 100 randomized cases) and it immediately finds a bug in existing tests. Concrete examples include a FizzBuzz spec that uncovers failures for 6 and 0 and a generator that creates todos, lets the database assign IDs, then deletes a created todo to test a non-existent ID. Shrinking reduces failures to minimal counterexamples; seed and size parameters make failures reproducible.

AI-written summary · about

  1. 0:00Introduction to talk
  2. 1:53Boring example-based tests
  3. 6:02Property-based testing basics
  4. 10:40FizzBuzz property-based test
  5. 18:51Test execution and seeds
  6. 23:09Custom generators for complex types
  7. 27:23Types of properties to test
  8. 32:49Shrinkers and failure minimization
  9. 34:57Limitations of property-based testing
  10. 36:42Library recommendations
  11. 37:47Acknowledgements and references
  12. 38:51Q&A session
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.