Visual testing baseline management: screenshots as decisions
Baselines aren't just images—they're records of accepted visual intent. Treat baseline updates with the same care as code changes, and visual testing becomes trustworthy.
What a baseline represents
A baseline is the accepted visual state of your UI at a point in time. It's a decision: "this is how this component/page should look."
When you update a baseline, you're not just making a test pass. You're declaring that the new visual state is intentionally correct and should be protected going forward.
This framing matters. Teams that treat baselines as "whatever makes the test green" end up with visual tests that don't catch anything meaningful.
Common baseline failure modes
Most teams don't fail at capturing screenshots. They fail at managing what those screenshots mean over time.
Accidental approvals
Someone updates baselines without understanding the change. Regressions become the new 'expected' state.
Noisy bulk updates
Environmental changes trigger hundreds of diffs. Teams approve everything to unblock, losing signal.
Branch confusion
Baselines updated on one branch conflict with another. Merges become visual testing nightmares.
Lost context
Weeks later, no one remembers why a baseline was updated. Was it intentional? Was it reviewed?
Each of these erodes confidence. Eventually, the team stops trusting visual tests—or stops running them entirely.
A sane baseline policy
Good baseline management isn't about tooling. It's about treating visual changes as decisions that deserve review and documentation.
Intentional updates only
Baselines change because design changed, not because tests failed. The question is 'should this be the new baseline?'—not 'how do I make tests pass?'
Clear ownership
Every baseline update should have an owner who understands and approves the visual change. Anonymous updates erode trust.
Documented intent
Link baseline updates to issues, design specs, or decisions. Future you will want to know why this changed.
Review before merge
Baseline updates should go through the same review process as code changes. A diff viewer helps reviewers understand what changed.
This takes discipline, but it pays off. Teams with rigorous baseline policies actually trust their visual tests.
Audit trail mindset
Six months from now, someone will ask: "Why does this component look this way? When did it change?"
If your baseline updates are tied to issues, reviewed in PRs, and documented with intent, you can answer. If baselines were bulk-approved to unblock a pipeline, you can't.
This traceability matters for engineering managers and designers who need confidence in visual consistency. See approval workflows and designer-approved testing for more on building this confidence.
Avoid the baseline churn trap
If you're updating baselines constantly, something is wrong upstream:
- Environmental flakiness: Tests fail for reasons unrelated to real changes. See reducing flakiness.
- Too many snapshots: You're testing more than you can maintain. Reduce scope to meaningful coverage.
- Rapid design iteration: Maybe visual testing is premature for this area. Focus on stable, contracted UI.
Baseline updates should be occasional and intentional, not a regular part of every PR.
Quick checklist
- Define what triggers a baseline update (design change, not test failure)
- Assign ownership for baseline approval per area
- Require documented intent for every baseline update
- Use visual diff tools for clear before/after review
- Treat baseline updates like code changes (review required)
- Establish process for handling environmental drift
- Document baseline management process for the team
Related guides
Frequently Asked Questions
Should screenshot baselines be committed to git?
Who should approve baseline updates?
How often should we update baselines?
How do you avoid accidental baseline changes?
What's the best way to review baseline updates?
How do teams handle multiple release branches?
What if baselines get out of sync?
How do you handle temporary visual states?
Join the waitlist for better baseline management
Get early access