Automatic White Box Testing With Free Monads
summary
Presents a concrete system that turns hierarchical free monads into testable scenarios by swapping interpreters into record/replay mode, emitting JSON recordings of every effectful step and using a player that replays and diffs those entries. Claims this runs in production at JustPay, unifies unit and integration tests, supports per-entry no-mock/no-verify options, and requires only serializable entry types. The prototype and showcase exist, the player flags mismatches, and teams report much lower test maintenance.
AI-written summary · about
chapters (14)
- 0:00Talk introduction
- 0:27What are free monads
- 1:10Speaker background
- 3:21Business logic with free monads
- 6:46Flow framework internals
- 8:35Hierarchical free monads
- 8:55Interpreters and testing
- 10:22Limitations of test interpreters
- 11:31Unit testing in Haskell
- 14:45Why unit tests are hated
- 19:15Automatic white box testing
- 24:01Recording and replaying flows
- 27:59Questions and answers
- 34:05Conclusions and resources
