~/talk

Observing Chance: A Gold Master Test in Practice

Talkat RailsConf 2017 · 2017-04-25..04-27· [ruby-on-rails, testing]
slides:none on file

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

  1. 0:00Start
  2. 3:21developing legacy code is inevitable
  3. 4:08untested legacy code
  4. 7:17observing change: a gold master test in practice
  5. 7:45defining the gold master test
  6. 8:22In nearly every legacy system, what the system does is more important than what it's supposed to do.
  7. 10:22a heuristic for writing characterization tests (abridged)
  8. 15:58writing the test
  9. 23:35working with the test
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.