ゴールデンテスト - CI/CD用語集の定義
ゴールデンテストは、出力を信頼できる参照ファイルと照合し、不一致で失敗します。
ゴールデンテストは、プログラムの出力を既知の正しい参照ファイル、すなわちgolden fileと比較し、いかなる差異でも失敗します。スナップショットテストのファイルベース版の兄弟です。
golden fileは、期待される出力が大きいコンパイラやCLIツールでよく使われます。更新フラグは、レビュー済みの変更の後にgolden fileを再生成します。
CIでは
golden fileはリポジトリにコミットされます。CIは現在の出力をそれと差分比較し、レビュアーは再生成を意図的に承認します。
関連ガイド
Snapshot Testing - CI/CD Glossary DefinitionSnapshot Testing: Snapshot testing records the output of code (rendered UI, serialized data) on first run and…
Approval Testing - CI/CD Glossary DefinitionApproval Testing: Approval testing captures the actual output of code and requires a human to approve it as c…
Characterization Test - CI/CD Glossary DefinitionCharacterization Test: A characterization test captures the current behavior of existing (often legacy) code…