Frontend & browser·Testing a user interface
the build failed because a component moved three pixels and the image comparison noticed.
Visual regression test
Also calledscreenshot test, visual diff
Comparing rendered screenshots against approved baselines to catch visual changes no assertion describes. It is the only way to catch a CSS regression in a component nobody thought to test. It is also the most flake-prone kind of test there is — fonts, antialiasing, animation timing and platform rendering all move pixels — so it needs a tolerance, deterministic rendering and a fast approval flow to survive.