Back to all steps

Visual regression

Step fields
difference threshold, % (default 2) (number)
Compares the current page with how it looked in previous runs of this same step — catches visual regressions (broken layout, text or an element that moved or disappeared, broken styling). The parameter is the difference threshold in percent of area (default 2%): below it the step passes, above it the test fails. The baseline is this step’s screenshots from the latest runs; the comparison is pixel-based, light render noise and anti-aliasing are ignored, and the “matches at least one of the recent frames” tolerance absorbs minor dynamics. On the first run or after the scenario changes, the baseline is rebuilt from scratch (the step simply passes). If the difference exceeds the threshold, the frame is sent to AI vision to explain what exactly changed (spends the test owner’s AI tokens; if the balance is too low, only the pixel comparison runs, without an AI verdict). The result and verdict appear on the run report page at this step. In preview/recorder it is a stub: the comparison only runs during an actual test run.
Usage example

Compares the current page with how it looked before. The worker takes a screenshot of the current page and compares it with frames of this same step from the latest runs — catching visual regressions.

What it catches:

  • broken layout — blocks shifted, an element moved;
  • missing or shifted text/element;
  • broken styling — changed size, spacing, colors.

The parameter is the threshold of difference in percent of area (default 2%): a difference below it passes, above it the test fails. The comparison is pixel-based; light render noise and anti-aliasing are ignored, and the “matches at least one of the recent frames” tolerance absorbs minor dynamics.

Step outcome:

  • first run or scenario changed → the baseline is rebuilt, the step passes;
  • difference within the threshold → step passed;
  • difference above the thresholdtest fails; the frame is sent to AI vision to explain what exactly changed — the verdict appears on the run report page.

Spends AI tokens only when there is a difference (for the verdict). If tokens are low, only the pixel comparison runs, without an AI explanation.

In preview / recorder it is a stub: the comparison only runs during an actual test run.

A typical combo — capture the page state after navigation:

  1. Go to page — open the page
  2. Visual regression