Skip to content
Latchkey

Golden File (Snapshot Test) - CI/CD Glossary Definition

A golden file test compares current output against an approved reference file stored on disk and fails on any difference.

A golden file, also called a snapshot test, stores an approved reference output on disk and fails a test when current output differs from it. The stored file is the "golden" expected result.

Golden files suit large or structured output (rendered HTML, serialized data). The risk is blindly re-approving snapshots, which lets bugs slip in.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →