~/talk

How to specify it! A guide to writing properties of pure functions

Talkat Code Mesh LDN 2019 · 2019-11-07..11-08· [testing, functional-programming]
slides:none on file

Five concrete strategies for pure functions: test invariants on generated trees, write postconditions for each operation, use metamorphic testing (change inputs and assert relations), build an abstract model and check results via model-based properties, and validate generators and shrinking. The author plants eight bugs: model-based tests find all bugs and are fastest (around six to eight tests on average), metamorphic tests are the best second choice, postconditions are middling, and simple invariant checks miss many faults.

AI-written summary · about

  1. 0:00Intro
  2. 1:07Imagine testing reverse...
  3. 3:16Replicating the code in the tests...
  4. 8:11Property Based Testing
  5. 9:24Example
  6. 10:43Generator and shrinker
  7. 11:38Is there an invariant?
  8. 13:12Invariant properties
  9. 14:24insert
  10. 16:01Testing our tests
  11. 19:05Fixing shrinking
  12. 19:44What is the postcondition?
  13. 21:27What is the postcondition of find?
  14. 23:41Metamorphic properties
  15. 28:16Equivalence for trees
  16. 29:16Model-based properties
  17. 33:49Effectiveness
  18. 37:29Mean time to failure
~/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.