beta
Documentation

Diff Batches

A diff batch compares two capture batches to detect visual regressions. One batch is the reference (the known-good baseline) and the other is the candidate (the new deployment to review).

Triggering a diff batch

You can start a diff batch in two ways:

Lifecycle

StatusMeaning
PendingCreated, not yet started
RunningAt least one page is being diffed
DoneAll page comparisons have finished
ErrorThe batch failed to launch
CancelledEvery page comparison was skipped, so there was nothing to diff

Verdict

Once complete, a diff batch has a verdict that summarises the result across all its page comparisons:

VerdictMeaning
PassEvery diffed page stayed within the configured thresholds
WarnEdge cases only (new/removed pages), per the environment's verdict config
FailA diffed page exceeded a threshold (percentage or pixel count), or a critical error occurred
SkippedAll comparisons were skipped (e.g. all reference screenshots errored)

Verdict rollup priority: Fail > Warn > Pass > Skipped.

Page comparisons

Each page in the batch is compared individually. A comparison can result in:

Some comparisons are skipped rather than diffed when the page situation makes a pixel comparison impossible:

ReasonMeaning
New pagePage exists in candidate but not in reference
Removed pagePage exists in reference but not in candidate
Reference errorReference screenshot failed to capture
Candidate errorCandidate screenshot failed to capture
Both erroredBoth screenshots failed to capture

The verdict assigned to each skipped scenario is controlled by the environment's verdict config.

When a page comparison fails

A comparison that could not be computed shows an error code. Its verdict is the one the environment's verdict config assigns to a diff processing error.

CodeWhat happened
PNG_WIDTH_MISMATCHThe two screenshots do not have the same width, usually because the page's viewport width changed between the two captures.
PNG_TOO_SMALLOne of the screenshots is smaller than 100 × 100 pixels.
Any other codeAn internal error on our side. Launch a new diff batch to try again.

A comparison that fails is never counted in your usage, whatever its code.