BackstopJS Visual Testing
Testing & QualityBackstopJS Visual Testing is an Agent Skill for testing & quality published in the a5c-ai/babysitter repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
BackstopJS visual regression testing for self-hosted visual comparison
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/a5c-ai/babysitter/blob/HEAD/library/specializations/qa-testing-automation/skills/backstopjs-visual/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/backstopjs-visual-testing, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
BackstopJS Visual Testing Skill
Overview
This skill provides expert-level capabilities for BackstopJS-based visual regression testing, enabling self-hosted visual comparison without external dependencies.
Capabilities
Scenario Configuration
- Configure BackstopJS scenarios
- Define viewport configurations
- Set up selectors for capture
- Configure scenario-specific settings
Reference Management
- Execute reference runs
- Update reference images
- Handle reference versioning
Visual Comparison
- Execute test runs against references
- Analyze visual diff reports
- Configure diff thresholds
Interaction Handling
- Configure click and hover interactions
- Handle scroll positions
- Implement wait conditions
- Execute custom scripts before capture
Report Generation
- Generate HTML comparison reports
- CI-friendly report formats
- History tracking
Engine Configuration
- Configure Puppeteer engine settings
- Chrome launch options
- Network request handling
Target Processes
visual-regression.js- Visual regression testinge2e-test-suite.js- E2E with visual validation
Dependencies
backstopjs- Visual regression tool- Puppeteer (bundled)
- Docker (optional, for consistent rendering)
Usage Example
{
kind: 'skill',
skill: {
name: 'backstopjs-visual',
context: {
action: 'test',
configPath: 'backstop.json',
scenarios: ['homepage', 'dashboard'],
viewports: ['phone', 'tablet', 'desktop']
}
}
}
Configuration
The skill uses backstop.json for configuration and supports Docker-based execution for consistent results.