Comparison
Golden runvsGolden test
Golden run
before merging the refactor you run the new model over last month and diff its output against what the old one produced.
A retained known-good output used as the comparison baseline when changing transformation logic. It is how you refactor a two-hundred-line model with any confidence, because the test is not 'does it run' but 'is every row the same as before'. Where rows do differ, the useful discipline is that each difference must be explained rather than accepted in bulk.
Full entry →Golden test
you save the current output to a file and the test just checks nothing changed, which is exactly what you want on a legacy refactor.
A test comparing output against a recorded reference. It is excellent for pinning behaviour you are about to refactor and for large outputs no one wants to assert field by field. It goes bad when updating the snapshot becomes reflexive, at which point the test records what the code does rather than what it should.
Full entry →