Prompt
Should I use visual regression testing for every component story?
Latest observation
Oct 27, 2026
OpenAI APIWeb search: off
Not necessarily.
A good rule is: use visual regression testing for stories that are likely to break visually or are important to the product, not automatically for every single story.
Good candidates
Use it for stories that cover:
- Core UI components used across the app
- Complex states: hover, focus, disabled, loading, error, empty, responsive variants
- High-risk areas: checkout, auth, dashboards, design-system primitives
- Components with frequent CSS changes
- Cross-browser / responsive layouts
Lower priority candidates
You may skip or reduce coverage for:
- Very simple, low-risk components
- Stories that are basically duplicates with only trivial prop changes
- Highly dynamic content where screenshots are flaky
- Purely data-driven variations with little layout impact
Practical approach
Instead of “every story,” aim for:
- One or a few representative stories per component
- All meaningful visual states
- A targeted set of critical flows
Watch out for
If you test everything, you can end up with:
- Lots of maintenance noise
- False positives from tiny rendering changes
- Slow CI and review fatigue
Best practice
Treat visual regression as a risk-based safety net, not a blanket requirement. Combine it with:
- unit tests for logic
- interaction tests for behavior
- a smaller set of visual snapshots for appearance
If you want, I can suggest a simple decision checklist for choosing which stories to snapshot.