Observing Chance: A Gold Master Test in Practice
summary
Claims a practical gold master test that restores a sanitized production database dump (pg_dump → plaintext SQL), runs a huge Postgres-backed Ruby transformation, then stores a 5k-line CSV or full-page HTML as a golden artifact and diffs it on subsequent runs. Implementation uses RSpec, Capybara and optionally ImageMagick compare for screenshots; first run writes gold_master.txt/sql, later runs fail loudly if outputs diverge. A 38-minute, 61-slide demo shows it catching a regression that all 107 other tests miss.
AI-written summary · about
chapters (9)
- 0:00Start
- 3:21developing legacy code is inevitable
- 4:08untested legacy code
- 7:17observing change: a gold master test in practice
- 7:45defining the gold master test
- 8:22In nearly every legacy system, what the system does is more important than what it's supposed to do.
- 10:22a heuristic for writing characterization tests (abridged)
- 15:58writing the test
- 23:35working with the test
related talks
22mWriting tests when the code is already there: Golden Master technique
47mTest Automation Without Assertions
46mData needs testing too
38mTest Automation without Assertions
48mA deep dive into the Gilded Rose
36mAutomated Performance Testing of Postgres
39mModern Data Pipelines Testing Techniques: A Visual Guide
35mHitting a Gold Mine:How to Set the Gold Standard With Golden Tests
