~/talk

Writing tests when the code is already there: Golden Master technique

Talkat Scalapeño 2018 · on Monday, 2018-07-02· [testing, software-architecture]
links:none on file
slides:none on file

Explains the Golden Master method: run the untested system, capture inputs and outputs as files, and use those files as the reference before refactoring. Shows practical seams: override randomness by adding a CLI seed argument so outputs become reproducible, run the program across 100 seeds to broaden coverage, and compare new runs to the golden files. Describes building a scraper to convert legacy HTML blog posts to JSON, posting results to the new blog and committing the golden masters to detect regressions.

AI-written summary · about

  1. 0:00Introduction to legacy code testing
  2. 3:13Legacy code challenges and solutions
  3. 4:39Golden Master technique explained
  4. 7:33Live coding demo setup
  5. 9:50Generating the golden master
  6. 13:25Creating reproducible tests
  7. 14:16Writing the golden master test
  8. 16:22Pitfalls and best practices
  9. 18:06Real-world golden master examples
  10. 21:16Final thoughts and takeaways
~/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.