Definition
Visual baseline
What is a visual baseline in regression testing?
A visual baseline is a reviewed reference image of a component or page in a defined state. A later test captures the same state and compares the images so a reviewer can inspect a layout, content or styling change.
What makes two screenshots comparable?
Record the viewport, pixel density, browser, fonts and test data. Wait for the page state the screenshot is meant to show. If a changing region must be masked, keep the mask narrow and explain why. Review the difference before accepting an updated image as the new reference.
Worked example
A timestamp moves and a price disappears
A receipt screenshot includes a changing timestamp beside a total. Freeze the clock or mask the timestamp alone. Masking the whole receipt header could hide a wrapped or missing total, which is exactly the kind of change the baseline should reveal.
Try it on your pull request
Choose a change in your repository and tell Cue April what should happen. Review the proposed checks before they run.
Try Cue April on your repository