Allscreenshots Docs

Visual regression testing

Catch visual bugs before they reach production by comparing screenshots over time

Automatically detect unintended visual changes in your UI by comparing screenshots captured at different points in time.

The problem

CSS changes can break UI in unexpected ways. A tweak to one component might cascade into layout issues elsewhere. Manual testing doesn't scale, and customers often discover visual bugs before your team does.

Without automated visual testing, you're relying on:

  • Manual QA that misses edge cases
  • User reports after bugs reach production
  • Expensive rollbacks and hotfixes

How Allscreenshots helps

Capture consistent, high-fidelity screenshots in your CI/CD pipeline. Compare new screenshots against baselines and get immediate alerts when visual differences exceed your threshold.

  • Consistent rendering — Same browser, viewport, and wait conditions every time
  • Pixel-perfect comparisons — Detect even subtle visual regressions
  • CI/CD integration — Fail builds automatically when visual bugs are detected

Use hideSelectors to exclude dynamic content like timestamps, avatars, or ads from comparisons.

Quick example

Capture a screenshot of your staging environment for comparison:

curl -X POST https://api.allscreenshots.com/v1/screenshots \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://staging.example.com/checkout",
    "viewport": {"width": 1920, "height": 1080},
    "format": "png",
    "waitUntil": "networkidle",
    "hideSelectors": [".timestamp", ".random-avatar"]
  }'

Then use a comparison library like pixelmatch or looks-same to diff against your baseline.

Key features for this use case

Next steps

On this page