Property-Based Testing - Examples from Business Applications
summary
Journey from failing with QuickCheck to success using Hedgehog yields concrete patterns: one-line round-trip tests catch Unicode and codec bugs; idempotence checks expose PUT/auth race issues; associativity/commutativity-style tests reveal caching and ordering flaws. A Postgres-backed task/job queue and a Wai/Servant web API get validated by comparing DB results to a simplified in-memory model, plus an audit-log-driven stress test that asserts no double-locked jobs, eventual job attempts, and no concurrent pickups. About 80–90 Haskell projects show most PBT use stays trivial.
AI-written summary · about
chapters (6)
- 0:00Start
- 8:20Example-Based Tests
- 10:38Round Tripping Tests
- 21:06Associativity
- 28:40Implement a Simplified Model of the System under Test
- 39:17Example Based Tests
related talks
51mProperty-Based Testing
58mProperty Based Testing: Concepts and Examples
01h 24mIntroduction to Property Based Testing
46mProperty-based testing:You won't look at your tests the same way ever again
30mProperty-based Testing for Godly Tests
48mDomain Invariants & Property-Based Testing for the Masses
23mProperty based testing is a mindset
45mProperty based tests for the masses
