Capture and update visual baselines
Visual regression compares each run’s screenshot against a saved baseline and flags meaningful changes. This guide is the hands-on workflow: capture a baseline, read the diff, and update it when you meant to change the UI. For how the comparison actually decides pass/fail (and why), see Visual regression.
Add a screenshot step
Section titled “Add a screenshot step”Only screenshot (and takeScreenshot) steps run through the visual
pipeline — other steps capture screenshots for the report, but those
aren’t compared. Add a screenshot step where you want a visual check:
after a page loads, or targeted at one element. See the
step actions reference for the exact shape.
Capture the first baseline
Section titled “Capture the first baseline”You don’t do anything special for the first capture.
-
Run the test once. The first time a screenshot step runs with no baseline yet, Marriska saves what it captured as the baseline — you’ll see Baseline saved on that step.
-
Run it again. Now there’s a baseline to compare against, so the step goes through the pixel-and-vision cascade and reports pass or fail.
Each browser stores its own baseline — Chromium, Firefox, and WebKit render real differences (especially form controls and SVG), so a Firefox run compares against the Firefox baseline, not Chromium’s.
Review a visual diff
Section titled “Review a visual diff”When a visual step runs, its report row has a View Baseline toggle. Open it to see the Baseline and Current screenshots side by side, with the comparison’s verdict underneath — a one-line explanation of what changed (amber when it passed, red when it failed). Click either image to zoom.
That explanation is the point: a failed visual step tells you what looks wrong (“the primary button moved below the fold”), not just that something differs.
Update a baseline after an intentional change
Section titled “Update a baseline after an intentional change”You redesigned the header on purpose. Now the baseline is stale and the test fails on a change you wanted. Refresh it:
-
Open the test. Next to Run Test there’s an Update Baseline checkbox (it only appears when the test has screenshot steps).
-
Check it and run. With the box checked, Run Test overwrites the saved baselines with the new screenshots instead of comparing against them.
-
Uncheck it for normal runs. Leave it off and runs compare again, now against the updated baseline.
Baselines survive edits
Section titled “Baselines survive edits”Baselines are keyed by step ID + browser, not by position. So:
- Reordering steps or inserting new ones doesn’t invalidate a baseline — the step keeps its baseline.
- Deleting a screenshot step deletes its baseline with it.
A note on secrets
Section titled “A note on secrets”If a test uses sensitive variables, its screenshots never go to the external vision model — the comparison falls back to a local pixel diff so the image stays on the platform. Form fields holding secrets are also boxed out at capture.
Related
Section titled “Related”- Visual regression — how the pixel + vision cascade decides
- Step actions reference — the
screenshotaction - Reading a run report — where visual diffs show up
- Plan tier limits — monthly visual-compare quota