CI/CDVisual regression testing
Catch visual bugs before they ship
Add visual checks to your deployment pipeline. Capture screenshots before and after each release: we run the browsers, you decide what counts as a regression.
Free plan: 100 screenshots in total. No credit card.
curl -X POST https://api.allscreenshots.com/v1/screenshots \
-H "X-API-Key: $SCREENSHOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://staging.yoursite.com/checkout",
"viewport": { "width": 1280, "height": 720 },
"format": "png",
"waitUntil": "networkidle",
"hideSelectors": [".timestamp", ".user-avatar"]
}' --output current.pngimport pixelmatch from 'pixelmatch';
import { PNG } from 'pngjs';
import fs from 'node:fs';
const before = PNG.sync.read(fs.readFileSync('baseline.png'));
const after = PNG.sync.read(fs.readFileSync('current.png'));
const { width, height } = before;
const changed = pixelmatch(before.data, after.data, null, width, height, {
threshold: 0.1,
});
if (changed > 0) process.exit(1); // fail the buildThe same request before and after a deploy gives two images you can diff with any tool.
How platform teams use it
A CSS change can break your checkout button. Your customers won't tell you; they'll just leave.
You ship automatic updates to customer sites
Plugin updates, theme changes, framework upgrades. Your CI/CD pipeline deploys changes to thousands of customer sites every day.
A CSS change breaks the checkout button
A dependency update changes a CSS variable. The 'Buy Now' button is now white-on-white. Invisible. Clicks do nothing.
Customers don't notice until revenue drops
No errors in the console. No failed tests. Just silence, and a drop in conversions that takes days to diagnose.
Visual regression testing catches it first
Capture screenshots before and after every deployment. Compare them. Catch regressions before customers do, and roll back if needed.
“We use screenshot APIs as part of a visual regression test we run before certain updates. Their service allows us to capture screenshots of our sites before and after changes, helping us easily compare the differences and determine whether a rollback is needed.”
Your pipeline, our screenshots
Add visual regression testing to the CI/CD workflow you already have. We run the screenshot infrastructure, you keep the comparison logic.
Trigger
A deployment starts in your CI/CD: GitHub Actions, GitLab CI, Jenkins, CircleCI or any other pipeline.
Capture before
One API call captures the baseline screenshot.
Deploy and capture after
Your code ships and the API captures the new state, with the same viewport and settings.
Compare and decide
Your code diffs the images with pixelmatch, resemble.js or your own algorithm, and your build passes or fails.
Would rather not write the comparison? The dashboard has visual tests with journeys, checkpoints and approved baselines. It may need to be switched on for your organization.
Why not just use Playwright?
Playwright is great for testing. Running screenshot infrastructure at scale is a different problem.
| Comparison | Self-hosted Playwright | Allscreenshots API |
|---|---|---|
| Browser crashes | Your problem to handle | Handled automatically |
| Memory leaks at scale | Manual monitoring and restarts | Not your problem |
| Headless Chrome updates | Can break your code | Always current |
| Captures from another region | Deploy servers in each region | One parameter: US, EU or APAC (Pro and up) |
| CI timeouts | Block your pipeline | Async jobs with webhooks |
| Maintenance | Ongoing DevOps work | None |
Still need Playwright for your tests? Keep it. Use the API for screenshots and Playwright for everything else.
Built for reliable visual testing
Options that keep changing content and timing out of your diffs.
Stable captures
Wait for the page
Wait for network idle or a selector, so fonts, images and API calls have finished.
"waitUntil": "networkidle", "waitFor": "#checkout"Hide dynamic content
Hide timestamps, ads and avatars that change between captures, so they don’t show up as diffs.
"hideSelectors": [ ".timestamp", ".user-avatar" ]Same settings every run
Pin the viewport and pixel ratio, so a difference in the image is a difference in the page.
"viewport": { "width": 1280, "height": 720, "deviceScaleFactor": 1 }
Coverage
Phones and tablets
Use one of about 30 device presets instead of a separate mobile test suite.
"device": "iphone_15"Dark mode
Capture with prefers-color-scheme: dark to check both themes.
"darkMode": trueAsync and webhooks
Don’t hold up the pipeline. Queue the captures and get a webhook when they’re ready.
POST /v1/screenshots/async"webhookUrl": "https://ci.example.com/hook"
Drop into your existing pipeline
Complete examples for a CI platform and two test frameworks.
name: Visual Regression Test
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
visual-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Capture baseline screenshot
run: |
curl -X POST "https://api.allscreenshots.com/v1/screenshots" \
-H "X-API-Key: ${{ secrets.SCREENSHOT_API_KEY }}" \
-H "Content-Type: application/json" \
-d '{"url": "https://staging.example.com", "waitUntil": "networkidle"}' \
-o baseline.png
- name: Deploy to staging
run: npm run deploy:staging
- name: Capture new screenshot
run: |
curl -X POST "https://api.allscreenshots.com/v1/screenshots" \
-H "X-API-Key: ${{ secrets.SCREENSHOT_API_KEY }}" \
-H "Content-Type: application/json" \
-d '{"url": "https://staging.example.com", "waitUntil": "networkidle"}' \
-o current.png
- name: Compare screenshots
run: |
npx pixelmatch baseline.png current.png diff.png 1280 720
# Fails if diff exceeds thresholdPay only for screenshots that succeed
On paid plans, failed captures don’t count.
Pro0.98¢ each
Ship with confidence
Add visual checks to your pipeline in minutes. Free plan: 100 screenshots in total, no credit card.
- Full-page captures
- Popups and repeated sticky bars removed
- Markdown, JSON and PDF output
- Crawl a site from one URL
- Desktop, tablet and phone in one image
- Works in n8n, Make and Zapier
- MCP server for AI assistants