October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk5 min

How to Test Web Pages with Screenshot Diffs in BackstopJS

Learn how to configure BackstopJS scenarios, compare page screenshots, inspect visual diffs, and approve only intentional changes.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

BackstopJS tests web pages for visual regressions by comparing new browser screenshots with approved reference screenshots. Initialize a project, configure stable scenarios and viewports, run backstop test, inspect the report, and use backstop approve only when the changes are intentional.

How BackstopJS screenshot diffs work

BackstopJS automates visual regression testing: it captures pages and compares each test screenshot with a reference image. The difference report helps identify visual changes, but a diff alone does not prove that a change is a defect. Review the images and decide whether the change is expected before updating a baseline.

As an Amazon Associate I earn from qualifying purchases.

The project’s official README and documentation describe this workflow and configuration. Commands and options below follow that documentation; check the live project documentation for changes before adopting it in a new environment.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Set up a project and run its first comparison

  1. Initialize the project

    In the project environment where BackstopJS is installed, run backstop init. This creates a setup for defining URLs, viewports, cookies, selectors, and interactions. The generated configuration is the place to specify the pages and states your tests should cover.

    #1 Best Overall
    Philips 24 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 241V8LB
    • CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
    • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
    • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
    • WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
    • A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents
  2. Define at least one viewport and scenario

    BackstopJS requires at least one entry in viewports. Each scenario needs a label and URL. Add scenarios for meaningful page states rather than treating one URL as a complete test of the site.

  3. Capture and compare

    Run backstop test. BackstopJS captures test screenshots and displays a report comparing them with the current references. To rerun only selected scenarios, use the documented --filter option with your scenario selection.

  4. Review before approving

    Inspect the reference, test, and difference views in the report. If the difference is unintended, fix the page or test setup and run the test again. If it is an intentional design change, promote the latest test capture with backstop approve. Approval updates the references used for later comparisons; do not approve a batch simply to make a failing test pass.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
    Rank #2
    Philips 22 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 221V8LB
    • CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
    • 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
    • SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
    • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
    • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors

Configure scenarios that produce stable screenshots

A scenario should capture a reproducible page state. The following documented options address common needs:

  • selectors captures specified DOM elements rather than the whole document.
  • readySelector or readyEvent lets the test wait for an application-specific readiness condition.
  • delay adds a wait after readiness. Prefer a meaningful readiness signal where possible; an arbitrary delay alone can be unreliable when rendering time varies.
  • onBeforeScript and onReadyScript support browser setup and interactions around capture.
  • hideSelectors hides selected elements while preserving their layout flow. This can help with dynamic content in fixed-size regions.
  • removeSelectors removes selected elements from the DOM before capture. Use this when the variable content itself should not occupy space in the rendered page.
  • misMatchThreshold sets the permitted percentage of differing pixels before a screenshot is considered a failure.

Make asynchronous pages deterministic

For a single-page application or another page with asynchronous content, wait for the application’s actual ready state where practical. BackstopJS’s README recommends using known static content stubs for dynamic applications, ideally with content of varying lengths. That helps tests cover realistic layout changes while keeping the expected content reproducible.

Choose between hiding and removing variable content based on layout behavior. Hiding a fixed-dimension ad or widget retains its space; removing variable-size content allows the remaining page to flow as it would without that element. Neither choice is a substitute for testing important states that the content can create.

Rank #3
Sale
Dell 24 Monitor - SE2426H - 23.8-inch FHD (1920x1080) 144Hz 1ms Display, in-Plane Switching (IPS) Technology, AMD FreeSync™, TÜV 3-Star 2X HDMI, Tilt
  • Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
  • Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
  • Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
  • In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
  • Ultra-thin bezels: Maximize your viewing experience with thin bezels.

Choose a rendering engine and environment

The README says Puppeteer and Playwright are installed by default, with Puppeteer in the default configuration. It describes Playwright as an option for Chromium, Firefox, or WebKit. For Playwright captures, use the corresponding Playwright onBefore and onReady scripts. Playwright storage state can provide cookies and local storage for authenticated captures.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Keep the environment consistent between reference and test runs. BackstopJS notes that the same page can render differently across environments, particularly text. Its optional --docker mode is intended to reduce cross-environment differences, but it cannot eliminate every source of nondeterminism. Use it when the container setup matches your project’s workflow, and generate and compare references in the same rendering environment.

Interpret diffs and set thresholds carefully

The README documents 0.1 as the default misMatchThreshold. This is a BackstopJS setting, not a universal recommendation: the appropriate sensitivity depends on how stable your captures are and how much change your team wants to review. Start by inspecting the actual diff, then adjust the threshold only with a clear understanding of what small differences it will permit.

Rank #4
Sale
Samsung 27" Essential S3 (S36GD) Series FHD 1800R Curved Computer Monitor
  • CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
  • SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
  • MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
  • KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
  • INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient

The project also documents a precision limitation: default mismatch reporting does not detect mismatches below 0.01%. For cases that need a lower threshold, it documents usePreciseMatching. A threshold and matching mode determine what the test reports; they do not replace visual review of meaningful changes.

Troubleshoot common failures

  • Diffs appear on every run: Check whether fonts, dynamic content, animation, or the rendering environment varies between captures. Add an application-specific readiness condition, use stable content stubs, and keep the test and reference environments aligned.
  • The screenshot captures a loading or incomplete state: Replace reliance on a short fixed delay with a suitable readySelector or readyEvent when the application exposes one. Confirm that scripted setup and interactions complete before capture.
  • Docker runs time out: The BackstopJS README notes that Chrome headless memory use can contribute to timeout trouble in Docker. Review available resources and the container setup rather than treating every timeout as a page failure.
  • A Dockerized test cannot reach a local site: The README notes that localhost inside Docker may require a host-accessible URL such as host.docker.internal for Mac and Windows users. The exact behavior depends on the host and container configuration.
  • A test fails after a design change: Compare the reference and test images. Fix unintended changes; for intentional changes, approve only the relevant recent captures, using filtering where appropriate to limit which captures are promoted.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Consider project maintenance before adopting it

As accessed on October 3, 2026, the BackstopJS project README included a notice that the project needed a new maintainer or owner. That notice establishes the project’s stated stewardship status at that time; it does not establish release cadence or whether a maintainer has since been appointed. Check the live repository’s activity and verify compatibility with your dependencies and CI environment before making it a long-term testing dependency.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Or skip the browser setup

If you need a screenshot without setting up a BackstopJS browser workflow, ScreenshotNeo offers a screenshot API and MCP server. One GET request can return an image or PDF; for a direct website capture, the cURL example is:

Best Value
Sale
Sceptre New 22-Inch Gaming Monitor, FHD 1080p, Up to 144Hz, HDMI, DisplayPort, Built-in Speakers, Machine Black (E225W-FW144 Series, 2026)
  • 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
  • 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
  • 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

See the ScreenshotNeo API documentation for request options. ScreenshotNeo accepts cookie and consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; these steps can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, with response headers indicating the page verdict and billing status. Its MCP server provides take_screenshot, get_page_info, and capture_pdf for Claude, Cursor, and other MCP clients. The Free plan includes 1,000 shots per month without a card; paid plans start at $5 for 3,000 shots.

Sign up for ScreenshotNeo’s free plan: 1,000 screenshots a month, no card required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.