Verification · Testing
Visual regression testing
Compares screenshots of rendered pages or components with approved baselines and reports pixel differences.
Sub-techniques
-
Component snapshots
V1025.001Screenshot each component state in isolation.
-
Page snapshots
V1025.002Screenshot full pages at fixed viewports.
How to build it
- Render in a pinned browser and font environment to avoid noise.
- Store baselines per branch and approve changes in the PR.
- Set per-component diff thresholds rather than one global value.
Signals in a repository
- __screenshots__ or backstop_data directories.
- toHaveScreenshot assertions or a visual testing step in CI.