baseline snapshot
The approved reference image a visual test compares new screenshots against.
In more detail
Baselines are committed to the repository. They must be captured in the same browser, operating system and settings as the tests, otherwise fonts and anti-aliasing differ and every comparison fails.
Related terms
- visual regression testing — Testing that takes screenshots of components and compares them pixel by pixel with approved baseline images to catch unintended visual changes.
- diff — A listing of the differences between two versions of something, such as two files, two commits or two screenshots.
- flaky test — A test that sometimes passes and sometimes fails on the same code, because it depends on something it does not control.
Taught in
- Automated Accessibility Testing: axe-core & Testing Library — Design Systems & Component Engineering
- Visual Regression Testing: Playwright & Snapshot Differencing — Design Systems & Component Engineering