Prompt
I'm unhappy with BackstopJS because maintaining configs is painful
Latest observation
That’s a common pain point with BackstopJS—once the suite grows, config drift and per-scenario setup can get tedious fast.
A few ways to make it less painful:
-
Generate configs from a simpler source
Keep tests in a small JSON/YAML/JS DSL and compile them into Backstop config. That way you maintain one clean input model instead of hand-editing Backstop’s full config. -
Use reusable templates/presets
Define shared defaults for viewports, selectors, delays, and URL patterns, then override only the exceptions per page/component. -
Split by domain or feature
Smaller configs are easier to reason about than one giantbackstop.json. Run them in separate jobs if needed. -
Prefer a JS config over static JSON
If you’re not already, usebackstop.config.jsso you can use functions, loops, env vars, imports, and shared constants. -
Auto-discover scenarios
If your app structure is consistent, generate scenarios from routes, storybook stories, or a sitemap instead of listing everything manually. -
Move to a different tool if config is the core problem
If your team wants something more opinionated, tools like Playwright screenshot testing or Percy/Chromatic can reduce config overhead, especially for component-driven workflows.
If you want, I can help you:
- refactor an existing BackstopJS config into a maintainable JS setup, or
- suggest a better tool based on whether you’re testing pages, components, or a design system.