Invariants are everything
summary
Argues that property-based testing makes intent and invariants explicit and can replace many hand-crafted examples; uses Elixir with ExUnit.Properties, custom and built-in generators and the check all pattern to turn concrete Fibonacci, absolute-value and max/min stack tests into declarative properties; shows generators replace manual shuffles and lists, models (enum vs stack) validate behavior, and notes defaults run 100 examples so CI trade-offs matter; demos mostly run successfully after small fixes.
AI-written summary · about
chapters (7)
- 0:00Start
- 10:02check the magnitude
- 15:30construct a test case sort of from scratch the concrete values
- 16:00generate a list of integers
- 20:32writing distinct unit test cases
- 31:28replace the filter with a map
- 37:04which parts to test with property based tests
related talks
01h 24mIntroduction to Property Based Testing
57mDomain Invariants & Property-Based Testing for the Masses
23mProperty based testing is a mindset
48mDomain Invariants & Property-Based Testing for the Masses
26mThe missing piece of testing
40mProperty-based Thinking
44mHow to specify it! A guide to writing properties of pure functions
45mProperty based tests for the masses
