Thinking in Properties
summary
Property-based testing uses generators, shrinking and relational patterns to catch bugs beyond example tests: she uses QuickCheck in Erlang historically and now hedgehog in Haskell, writes generators for IPs and lists, asserts encode/decode round trip and reverse(reverse xs) == xs, and composes command-sequence (state-machine) tests and metamorphic relations to validate migrations and distributed behaviors. It repeatedly finds edge cases in production (data-center migrations, Cassandra/Elasticsearch upgrades), requires build/release effort, and noticeably improves confidence when generators and invariants match real inputs.
AI-written summary · about
chapters (33)
- 0:00Introduction
- 0:57Welcome
- 1:18Outline
- 2:20About me
- 3:29Origin story
- 4:13Collective origin story
- 5:20Usage examples
- 7:50Propertybased testing
- 9:02What are propertybased tests
- 11:38Looping
- 13:58Generators
- 15:22Primitive Generators
- 16:55ipv4 and ipv6
- 17:47applicative
- 19:26sample
- 19:45genlist
- 21:31Questions
- 25:39Idempotency
- 28:00Examples
- 29:30Associativity
- 31:03Commutativity
- 33:18Distributivity
- 34:19Identity Elements
- 35:24Relational Laws
- 36:46Type Class Laws
- 37:43Reflections
- 39:06Informal Model Checking
- 41:24Oracle
- 42:41JavaScript
- 44:14Metamorphic Relations
- 45:38Mutation Testing
- 46:29Thinking Beyond
- 48:38Feedback loops
