All glossary terms
Verify

Visual regression

Visual regression testing captures screenshots of UI components and compares them pixel-by-pixel (with tolerance) against baseline images on every change — catching unintended visual changes that escape unit and integration tests. Tools include Percy, Chromatic, Loki, BackstopJS, and Playwright's built-in screenshot comparison.

Visual regression is essential for design-system maintenance and any application where unintended UI changes have customer impact. The implementation challenges are practical: managing baselines (storing thousands of reference images, updating them deliberately on intentional changes), handling flakiness (font rendering differs across machines, animations cause noise), and CI integration (uploading screenshots to a comparison service, blocking merges on visual diffs). The wins are real: visual regression catches the class of defect that no other test type does — the button that's now invisible because a CSS rule changed two levels up.

Related terms