7 / 11 · Book 10 · AI-Powered Visual Comparison← prev⊞ allnext →Get the book →
1.7Baseline Management
| Strategy | How It Works | Pros | Cons |
|---|---|---|---|
| Git-tracked baselines | Store baseline PNGs in the repo | Versioned with code, simple | Repo bloat, merge conflicts |
| Cloud storage | Store in S3/GCS, reference by hash | No repo bloat, unlimited storage | Extra infra to manage |
| Tool-managed | Percy/Chromatic manage baselines | Zero maintenance, auto-approval UI | Vendor lock-in, cost |
| Branch-based | Baseline = screenshots from main branch | Always comparing against production | Cold start for new pages |
The cloud storage approach with tool-managed approval workflows (Percy, Chromatic) provides the best developer experience. Git-tracked baselines work well for smaller projects.
Pro Tip: AI-powered visual comparison is not a silver bullet -- it introduces non-determinism and cost. But for teams drowning in false positives from pixel-diff tools, it transforms visual regression testing from a burden into a useful safety net.