Visual Diff とは?
visual diff は、コンポーネントやページをレンダリングして画像をキャプチャし、承認済みの baseline と比較する visual regression test の出力です。差異のある領域が強調され、レビュアーが変更を確認または却下できます。新しい見た目が受け入れられると baseline が更新されます。
なぜ重要か
機能テストは、レイアウトが崩れたり色が変わったりしても pass してしまいます。visual diff は、DOM への assertion では見逃すような見た目の regression を、とりわけ browser や画面サイズをまたいで捕捉します。
ノイズの低減
- anti-aliasing とフォントレンダリングのしきい値
- timestamp のような動的な領域のマスキング
- キャプチャ前のアニメーションの安定化
関連ガイド
What Is a Snapshot Diff?A snapshot diff is the comparison between a freshly captured snapshot and a stored one, highlighting what cha…
What Is a Pixel Diff?A pixel diff counts or visualizes the individual pixels that differ between two images, often with a toleranc…
What Is a Perceptual Hash?A perceptual hash is a fingerprint of an image that stays similar when the image is slightly altered, letting…