# BackstopJS

BackstopJS is a visual regression testing tool that compares website screenshots before and after code changes to help developers catch unintended layout or design shifts across devices. It is open source and self-hosted, installable on Docker Hub.

Canonical page: https://ourlocalhost.com/app/6232/backstopjs

## Description

BackstopJS is a visual regression testing tool that compares website screenshots before and after code changes to help developers catch unintended layout or design shifts across devices.

## Platform availability

Available on 0 of 10 platforms.

## Health score

53/100 (Fair), based on 4 of 5 factors.
- Maintained: 68 (last commit 74 days ago)
- Popular: 77 (7,204 GitHub stars)
- Easy to install: 25 (0 install platforms, install notes, Docker image)
- Security check: 20 (1 serious finding, 25 minor, CI, tests, OpenSSF Scorecard 3.7/10)

## Security check

1 serious finding: Uses basic-ftp 5.0.4, which has a known critical vulnerability.
Automated checks on commit a11d365, 17 Oct 2026. Not an audit.

## Links

- GitHub: https://github.com/garris/BackstopJS
- Docker Hub: https://hub.docker.com/r/docksal/backstopjs
- Official website: http://backstopjs.org

## Common questions

### Is it safe to run backstop init in a folder that already has project files?

No, the docs say to run it in an empty folder because it can overwrite existing files.

### How should I install BackstopJS so a project uses its own copy?

Run npm install backstopjs from the project root and call ./node_modules/.bin/backstop for commands. This keeps the project using its own copy of BackstopJS.

### What files should I back up to preserve BackstopJS tests and baselines?

Keep backstop.json and the backstop_data folder, which stores screenshots, reports, and reference images. Deleting or overwriting those can lose the test setup and baseline images.

### How do I turn a passing test into the new reference baseline?

Run backstop approve after the test looks good. It updates the reference files with the results from the last test.

### Can I use Docker to avoid cross-platform screenshot differences?

Yes, BackstopJS has integrated Docker rendering to eliminate cross-platform rendering shenanigans.

### Can BackstopJS simulate user interactions before taking screenshots?

Yes, it supports simulating user interactions with Playwright or Puppeteer scripts.

---
Source: Our Local Host (https://ourlocalhost.com/app/6232/backstopjs), the self-hosted and open-source app directory.
