Random Data Generation With Scalacheck
summary
A small library generates random fixtures from case classes using ScalaCheck and shapeless derivation, then swaps shapeless for Magnolia to cut compile time from ~1500s to ~300s; it takes four lines of code to get a generator, finds real bugs in integration tests, and prints a reproducible seed for determinism so failing inputs can be replayed. Uses ScalaCheck + Shapeless -> Magnolia and works in production test suites.
AI-written summary · about
chapters (18)
- 0:00Introduction and motivation
- 2:31Unit vs integration tests
- 5:21Scalacheck basics
- 7:25Scalacheck limitations
- 9:10Startup constraints
- 10:57Random fixtures solution
- 13:52Deterministic testing
- 16:18Library implementation
- 20:21Handling non-case classes
- 22:13Smart data generation
- 24:03Compilation time issues
- 25:11Magnolia introduction
- 26:54Performance improvements
- 27:37Magnolia library
- 29:02Shapeless vs Magnolia
- 29:23Key takeaways
- 32:16Testing philosophy
- 33:23Q&A session








