DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober 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 Scan×
Skip to content
World desk6 min

How to Visually Test Every GitHub Pull Request

Run screenshot comparisons on pull requests with Playwright or a hosted review service, and give reviewers the images and reports needed to assess changes.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To visually test pull requests, capture agreed browser states in automated tests, compare each screenshot with a reviewed baseline, and run those assertions in a GitHub Actions workflow triggered by pull request activity. Publish the test result and image artifacts as PR checks so a person can decide whether a difference is a regression or an intentional UI change.

What “every pull request” means

A visual test runs only for the routes, components, viewports, and states you choose to capture. A workflow triggered by pull request activity can run on each matching PR update, but it does not automatically cover every screen or interaction. Build coverage around the user journeys and UI states where an unintended change would matter.

Visual comparison identifies pixel differences; it cannot determine whether a redesign is correct. A failed assertion is a prompt to inspect the expected and actual images, not an automatic verdict that the code is wrong.

Choose where to keep and review baselines

Approach Best fit Ownership and trade-offs
Playwright Test screenshot assertions Teams that want a native test workflow and version-controlled references Your team reviews and updates baseline images and keeps capture conditions consistent.
Chromatic Teams seeking hosted visual review and PR checks, particularly when its supported workflows fit their stack Requires service setup and a project token. Check current plan and feature limits before adopting.
Percy with Playwright Teams already using Playwright that want hosted comparison or an optional CI gate Requires Percy setup and a token, and adds a hosted-service dependency.

GitHub documents the pull_request workflow event, and Playwright’s CI guide demonstrates running tests on pull requests. Chromatic documents GitHub Actions integration and PR checks; Percy documents integration with Playwright screenshot assertions and an optional fail-on-changes gate. These hosted services are choices, not prerequisites for visual testing. Review their current documentation for setup and plan details: GitHub pull_request event, Playwright CI, Chromatic GitHub Actions, Chromatic with Playwright, and Percy with Playwright.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

Define screenshot tests and approve the first baseline

Use Playwright Test’s toHaveScreenshot() assertion at stable, meaningful UI states. For example, a test can open a route, wait for a key element, and capture the rendered page:

import { test, expect } from '@playwright/test';

test('checkout summary matches its approved appearance', async ({ page }) => {
  await page.goto('http://127.0.0.1:3000/checkout');
  await expect(page.getByRole('heading', { name: 'Order summary' })).toBeVisible();
  await expect(page).toHaveScreenshot('checkout-summary.png');
});

On the initial run, Playwright creates a reference image. Inspect that image before treating it as the expected design, then commit it with the test. Later runs compare their screenshot with that reference. When a design change is intentional, regenerate snapshots with npx playwright test --update-snapshots, inspect the resulting diffs, and commit only the reviewed baseline updates alongside the UI change. Playwright’s guide explains visual comparisons and screenshot snapshots.

Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.

Choose states that provide useful coverage

  • Cover high-value routes and components, including important empty, error, loading, and populated states where applicable.
  • Add responsive layouts deliberately; a desktop screenshot does not validate mobile rendering.
  • Capture after the interface reaches a defined state, such as a relevant element becoming visible, rather than relying on an arbitrary pause alone.
  • Keep the suite small enough to diagnose failures, but broad enough to cover the UI that matters. A PR trigger does not expand test coverage by itself.

Make captures stable enough to compare

Screenshot output can differ across operating systems, browsers and their versions, browser settings, hardware, power source, and headless mode. Generate and compare baselines in the same environment wherever practical. Playwright’s CI documentation describes using its container image to make the runner environment more consistent.

Control changing page content

  • Freeze or control dates, randomized values, and external data so a rerun does not capture different content.
  • Wait for required assets and UI elements to settle; asynchronous images, fonts, or data can otherwise produce intermittent differences.
  • Disable animations or hide known volatile elements when those details are not part of the test. Playwright supports a screenshot stylesheet through the stylePath option.
  • Use an explicit diff tolerance only when you understand the rendering noise it permits. Playwright supports maxDiffPixels; there is no universal threshold that is right for every product or environment.

Start with strict comparisons, inspect representative diffs, and adjust only for known noise. A permissive threshold can conceal a genuine visual regression as well as harmless rendering variation. See Playwright’s screenshot comparison options and CI environment guidance.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

Run visual tests on pull requests with GitHub Actions

Create a workflow file such as .github/workflows/visual-tests.yml. This example runs on pull request activity, installs the dependencies and Playwright browser, executes the tests, and uploads the HTML report even if a test fails:

name: Visual tests

on:
  pull_request:
    branches: [main]

jobs:
  visual-tests:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 20
          cache: npm
      - run: npm ci
      - run: npx playwright install --with-deps chromium
      - run: npx playwright test
      - uses: actions/upload-artifact@v4
        if: always()
        with:
          name: playwright-report
          path: playwright-report/
          if-no-files-found: ignore

Adjust the branch, Node version, install commands, browser choice, and test command to match the repository. Configure Playwright to produce the report artifact used above, or change the artifact path to match your reporter output. GitHub Actions supports pull request triggers, while Playwright’s CI guide provides workflow setup and report-artifact examples: GitHub workflow events and Playwright CI.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

Make the result useful to reviewers

  • Keep the visual test job visible in the PR’s checks, and make it a required check if that matches your merge policy.
  • Upload reports or test-result artifacts with an unconditional step such as if: always(), so a failed assertion still leaves evidence for review.
  • When a check fails, inspect expected and actual images. Fix an unintended UI change, or approve and commit the intended baseline update.
  • Protect credentials and grant CI only the access it needs. Do not expose hosted-service tokens to untrusted pull request code; align workflow behavior with repository security settings, especially for contributions from forks.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Handle larger suites without weakening required coverage

Playwright documents --only-changed as a preliminary heuristic for running test files likely affected by changes. It can miss relevant tests, so use it to get an earlier signal if useful, then run the complete required suite before merge. Changed-test selection is not a substitute for full visual checks.

Troubleshoot common visual-test failures

Symptom Likely cause What to do
The same test produces different images on different machines Runner OS, browser version, settings, or hardware differ Run baseline generation and CI in the same pinned or otherwise consistent environment; use a consistent CI container where practical.
Images differ between repeated runs in the same CI job Time, randomized content, animation, external data, or assets still loading Control volatile inputs, wait for the intended UI state, and hide irrelevant dynamic regions with a screenshot stylesheet when appropriate.
Many small pixels differ around text or edges Rendering conditions differ or the comparison is too sensitive to known noise First align browser and runner conditions. If residual noise is understood, consider a narrowly justified maxDiffPixels value and inspect what the tolerance could mask.
A baseline update causes a large diff The change may be intentional, or the capture state/environment changed unexpectedly Compare the actual image with the UI change and verify the test inputs and environment before approving regenerated references.
The report artifact is absent after a failure The upload step did not run after the test command failed, or the configured path differs Set the upload step to run with if: always() and ensure the artifact path matches the reporter output.

Or skip the browser setup

For a standalone screenshot of a URL, ScreenshotNeo offers a one-request screenshot API. This is not a replacement for stateful Playwright assertions and committed baselines: use it when you need a clean capture without setting up a browser runner.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
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. Cookie banners are accepted and removed along with known newsletter popups and chat widgets before capture. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, with response headers identifying the page verdict and billing status. Its MCP server gives AI agents screenshot tools. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Learn about ScreenshotNeo or sign up for 1,000 free screenshots a month with no card.

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. Shenzhen desk3 min
    HONOR Expands Beyond Smartphones With Humanoid Robot RevealHONOR said it unveiled its first humanoid robot at MWC 2026 and named shopping assistance, workplace inspections, and supportive companionship as intended uses. Later Robotics D1 claims and a reported…
  2. Cupertino desk5 min
    Apple Unveils AirPods Max 2: The Upgrade That Should Have Happened Years AgoAirPods Max 2 adds H2-powered audio features and Apple claims up to 1.5× more effective ANC, but its design, Smart Case, and 20-hour battery rating are unchanged. Wired lossless audio…
  3. Cupertino desk4 min
    Apple’s OLED Touch MacBooks Are Coming—but the Dynamic Island Is the Real GambleApple has not announced an OLED touchscreen MacBook, but reports point to high-end models arriving in late 2026 or early 2027. The reported Mac Dynamic Island could be useful, but…
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.