BackstopJS
Self-hosted visual regression testing for web pages, with reference/test/approve workflow.
Pricing
Free / Open source
Type
Automation
Languages
JavaScript
// VERDICT
Reach for BackstopJS when you want free, self-run visual regression via screenshot diffing and can manage baselines yourself. Skip it when you want AI diffing that reduces false positives (Applitools) or a managed cloud service (Percy/Chromatic).
Best for
Open-source visual regression testing - capturing screenshots of pages/components and diffing them against approved baselines to catch unintended visual changes, free and self-run.
Avoid when
You want AI-driven diffing that suppresses noise (Applitools), a managed cloud service, or Storybook-native visual testing.
CI/CD fit
CLI + config · headless browser · CI with baseline management
Languages
JavaScript
Team fit
Teams wanting free visual testing · Self-hosted CI · Frontend QA
Setup
Maintenance
Learning
Licence
// BEST FOR
- Free, open-source visual regression testing
- Screenshot capture and pixel/diff comparison
- Configurable scenarios and viewports
- Self-run in CI with your own baselines
- Catching unintended visual changes
- No per-snapshot cloud cost
// AVOID WHEN
- You want AI diffing that suppresses rendering noise (Applitools)
- A managed cloud service is preferred (Percy/Chromatic)
- Storybook-native visual testing is the need
- You don't want to manage baselines yourself
- False positives from pixel diffs are a concern
- Minimal setup is the priority
// QUICK START
npm install -g backstopjs
backstop init # configure scenarios/viewports
backstop reference && backstop test # capture baselines, then diff in CI// ALTERNATIVES TO CONSIDER
| Tool | Choose it when |
|---|---|
| Percy | You want a managed cloud visual testing service. |
| Applitools | You want AI visual diffing that suppresses noise. |
| Loki | You want visual regression tied to Storybook. |
// FEATURES
- Reference/test/approve workflow for snapshots
- Headless Chrome via Puppeteer
- Configurable scenarios with selectors and viewports
- Reporting via local browser, JSON, or CI
- Docker image for consistent CI rendering
- Custom onBefore/onReady scripts per scenario
// PROS
- Self-hosted — no per-snapshot pricing
- Configurable enough for complex apps
- Mature, widely adopted
// CONS
- Diff engine less tolerant than Applitools' AI
- Render consistency requires Docker discipline
- Reviewing diffs is less polished than SaaS alternatives
// EXAMPLE QA WORKFLOW
Configure BackstopJS scenarios and viewports
Capture reference baseline images
Run tests to diff against baselines
Triage diffs (separate real changes from noise)
Approve and update baselines
Run in CI and manage baseline storage
// RELATED QA.CODES RESOURCES
Glossary
Practice