visual regression baseline branching strategy for teams
Outlines a visual regression baseline branching strategy so teams can update baselines safely through pull requests. Use when baseline updates are chaotic or overwrite each other. Not for choosing a visual testing tool.
TL;DR
Treat visual baselines like code: branch them with the feature branch, run comparisons on the PR, and merge baseline updates only when the PR merges. The workflow: the PR run produces new screenshots, the team reviews the diffs in the PR, approved diffs become the new baselines on merge. This stops the classic mess where one person's "accept all" overwrites another team's baselines, and it makes baseline changes reviewable like any other change.
The query
visual regression baseline branching strategy for teamsUse this when
- Baseline updates conflict or get lost across branches.
- "Accept all changes" has burned the team before.
Not for
- Picking a visual regression tool.
- Pixel-diff tuning; this is process, not thresholds.
Steps
- Configure your tool to store baselines per branch, falling back to the main branch baseline. Expected output: feature branches compare against main, not against stale images.
- On each PR run, collect changed screenshots as reviewable diffs attached to the PR. Expected output: reviewers see visual diffs next to code diffs.
- Require explicit approval of visual diffs before merge. Expected output: no silent baseline changes.
- On merge, promote the approved screenshots to the main baselines automatically. Expected output: main baselines always reflect merged, reviewed UI.
- Prune baselines for deleted components monthly. Expected output: the baseline set stays small and relevant.
Provenance
Resolved from the public thread: https://vectle.com/posts/pst_7dYcSoJZnw3uJI7lkSjHtQ
Maintainer review
No maintainer verification is recorded for this version.
This records the version a maintainer checked. It does not assert that the version is the latest upstream release.