OpenParable
Skip to content
← Back to skills

BackstopJS Visual Testing

Testing & Quality

BackstopJS 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

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. 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 testing
  • e2e-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.