View all services
Talk to QA Advisor
/Blog/Visual Testing (2027): What It Catches That Functional Tests Miss, Tested
Functional Testing7 min read

Visual Testing (2027): What It Catches That Functional Tests Miss, Tested

A product card broken five ways and tested in Chromium and Firefox: the functional check passed every time, while visual checks caught a hidden button and a layout shift.

Published August 8, 2023Last updated October 29, 2026
On this page

Visual testing checks what a user actually sees: whether the page looks right, not just whether it works. A functional test can confirm that a button exists and responds to a click while the button sits hidden under a banner. A visual test compares a screenshot of the page with an approved baseline and flags the difference.

To show where each kind of test earns its place, we built one small product page and broke it five ways on 29 October 2026. We ran a functional check and three visual checks against every version in Chromium and Firefox with Playwright 1.64.1. The functional check passed all ten times. The default visual check failed on both real defects, stayed quiet on a colour change no person could see, and raised a false alarm on a live clock until we masked it.

Figure 1 · Five changes, four checks
The functional check passed every time
One product card, five controlled changes, compared against the same baseline in Chromium. Firefox gave the same pass or fail in all 20 cases.
No change
The page as it was
Functional
Pass
Visual
Pass
Masked
Pass
Strict
Pass
Colour tint
Text colour moved from #1c1b21 to #1e1d23, invisible to the eye
Functional
Pass
Visual
Pass
Masked
Pass
Strict
Fail
strict: 1,237 px
2 px shift
Card padding grew by 2 px at the top and bottom
Functional
Pass
Visual
Fail
Masked
Fail
Strict
Fail
default: 3,254 px
Hidden button
A promo banner covers Add to basket
Functional
Pass
Visual
Fail
Masked
Fail
Strict
Fail
default: 5,889 px
Live clock
A timestamp changes on every load
Functional
Pass
Visual
Fail
Masked
Pass
Strict
Fail
default: 104 px
Source: our run, Playwright 1.64.1, Chromium and Firefox, Windows 11, 29 October 2026. Pixel counts are Chromium; Firefox counts differed slightly.

Why visual defects slip past functional tests

Functional tests ask questions about the page structure: does this element exist, does it contain this text, does it respond to a click? They do not ask how the page looks. That gap matters because people judge software by what they see. Rather than quote survey figures we could not verify, we show the effect directly in the experiment below.

The Cypress documentation on visual testing puts the gap plainly: "an application can pass every functional test and still ship visibly broken." It lists the usual causes, including a CSS change that misaligns elements, a brand colour that renders wrong and a font that silently falls back to a default.

Layout, colour and overlap need checking by QA experts or by tests that look at the rendered page. Otherwise a release that passes every check can still drive users away.

Also Read: Best Practices for Streamlined Quality Testing to Reduce Churn Rate

How visual testing works

Visual testing, also called visual regression testing, sits alongside UI/UX testing: it automates the part of a UI review that compares how the page looks now with how it looked when it was approved. Every tool follows the same three steps.

  1. Capture. The test drives the application to a known state and takes a screenshot of the page or of one element.
  2. Compare. The screenshot is compared with a stored baseline, pixel by pixel. If more pixels differ than the test allows, it fails.
  3. Review. A person looks at the difference. An unintended change is a bug. An intended change becomes the new baseline.

The review step is what separates a useful visual suite from a noisy one. A visual test cannot know whether a change was meant, so it hands that decision to a person, with the evidence attached.

A note on terms: in engineering, "visual testing" also names a non-destructive testing method, inspecting materials and welds by eye. That meaning has its own standards, such as ISO 17637:2016 for fusion-welded joints, and it is not covered here. This guide is about software.

The baseline is the contract

Playwright creates the baseline on the first run. Its Visual comparisons guide explains that toHaveScreenshot() "took a bunch of screenshots until two consecutive screenshots matched, and saved the last screenshot to file system". Later runs compare against that file, and you update it with npx playwright test --update-snapshots when the design changes on purpose.

Treat baseline images like code. Commit them, review changes to them in the same pull request as the change that caused them, and never update them just to make a failing build pass.

Also Read: QA Testing for Tech Startups: Challenges and Solutions

Our experiment: one page, five changes, four checks

The page is a single product card: a name, a price, a short description, an Add to basket button and a "prices checked at" timestamp. A small local server returns the same card with one controlled change at a time:

  • No change, to prove the tests pass on the baseline.
  • Colour tint: the heading and price colour moved from #1c1b21 to #1e1d23, two units per colour channel.
  • 2 px shift: the card's padding grew from 16 px to 18 px at the top and bottom, which moves everything inside it down 2 px.
  • Hidden button: a promo banner was placed over the Add to basket button, with pointer-events: none so clicks still pass through it.
  • Live clock: the timestamp shows the current time on every load.

The tests

Each test file runs four checks against whichever version the VARIANT variable selects. The functional check confirms the button is visible and clickable. The visual checks compare the page with the baseline at the default settings, with the timestamp masked, and at a strict colour threshold of 0.

// Each test compares one variant of the page against the same baseline ("card.png").
// Run 1 with --update-snapshots on ?v=base creates the baseline; later runs compare.
const { test, expect } = require("@playwright/test");

const BASE = "http://localhost:4256/";
const variant = process.env.VARIANT || "base";

test("functional check: the button is visible and clickable", async ({ page }) => {
  await page.goto(`${BASE}?v=${variant}`);
  await expect(page.getByRole("button", { name: "Add to basket" })).toBeVisible();
  await page.getByRole("button", { name: "Add to basket" }).click({ trial: true });
});

test("visual check: the card matches the baseline", async ({ page }) => {
  await page.goto(`${BASE}?v=${variant}`);
  await expect(page).toHaveScreenshot("card.png");
});

test("visual check with the timestamp masked", async ({ page }) => {
  await page.goto(`${BASE}?v=${variant}`);
  await expect(page).toHaveScreenshot("card-masked.png", { mask: [page.locator("#stamp")] });
});

test("visual check at threshold 0 (strict colour)", async ({ page }) => {
  await page.goto(`${BASE}?v=${variant}`);
  await expect(page).toHaveScreenshot("card-strict.png", { threshold: 0 });
});

The configuration runs every test in Chromium and Firefox at a fixed 360 by 360 pixel viewport:

const { defineConfig } = require("@playwright/test");
module.exports = defineConfig({
  testDir: "./tests",
  reporter: [["list"]],
  use: { viewport: { width: 360, height: 360 } },
  expect: { toHaveScreenshot: {} },
  projects: [
    { name: "chromium", use: { browserName: "chromium" } },
    { name: "firefox", use: { browserName: "firefox" } },
  ],
});

We created the baselines once with --update-snapshots on the unchanged page, then ran the suite against each version. Four checks, two browsers and five versions make 40 results. Figure 1 shows Chromium; Firefox matched every pass and fail.

What visual testing caught

A button nobody could see

hidden button before after
hidden button before after

This is the case that justifies visual testing on its own. The banner covered the button completely, yet the functional check passed in both browsers. Playwright's actionability rules explain why. An element counts as visible when it "has non-empty bounding box and does not have visibility:hidden computed style". Nothing in that definition asks whether something else is drawn on top. The click check does look for an overlay that "will instead capture the click", but our banner let clicks pass through, so the button still received them.

The visual check failed at once: 5,889 pixels differed in Chromium and 5,874 in Firefox.

A user would see a promo banner and no way to buy. This kind of defect is common after marketing banners, cookie notices or chat widgets are added to a page by a team that never runs the purchase journey.

A 2 px layout shift

Growing the padding by 2 px at the top and bottom moved the card's contents down and made the card 4 px taller. The default visual check failed with 3,254 changed pixels in Chromium and 3,132 in Firefox. A 2 px shift is easy to miss by eye in a review, but on a busy page it is often the first sign of a broken layout, such as text that will wrap on a smaller screen.

Tuning sensitivity: a change no one can see

The tint is the opposite case. Two units of colour change are invisible to the eye, and at Playwright's default threshold of 0.2 the visual check passed. Playwright describes threshold as "an acceptable perceived color difference in the YIQ color space", from 0 (strict) to 1 (lax).

At threshold 0, the same change failed with 1,237 pixels in Chromium and 1,371 in Firefox.

Figure 2 · Threshold
A change nobody can see, flagged by a strict setting
The text colour moved by two units per channel. At Playwright's default threshold the check passed; at threshold 0 it failed in both browsers.
Default threshold 0.2, Chromium
Pass
0 px
Default threshold 0.2, Firefox
Pass
0 px
Threshold 0, Chromium
Fail
1,237 px
Threshold 0, Firefox
Fail
1,371 px
Source: our run, Playwright 1.64.1, Chromium and Firefox, Windows 11, 29 October 2026; threshold default from playwright.dev Visual comparisons.

Strict is not automatically better. A threshold of 0 turns harmless rendering noise into failures, and a team that sees false alarms every day stops reading them. Start with the default, and tighten the threshold only for elements where exact colour matters, such as a brand logo or a status colour.

Also Read: Why Are Extensive Test Coverage Techniques Necessary in QA?

Where visual testing goes wrong

Dynamic content

The live clock changed a few characters of small text, and the default visual check failed every time: 104 pixels in Chromium and 83 in Firefox. Nothing was wrong with the page. Left alone, a check like this teaches the team to ignore red builds.

Masking fixes it. Playwright's mask option covers chosen elements with a solid box, by default pink #FF00FF, in both the baseline and the new screenshot. With the timestamp masked, the check passed in both browsers.

Figure 3 · Dynamic content
Mask what changes on purpose, and nothing else
A live timestamp failed the visual check on every run. Masking that one element fixed it without hiding the real changes.
Without a mask
Fail
104 px differ in Chromium, 83 px in Firefox: only the timestamp changed.
With mask: [page.locator("#stamp")]
Pass
The timestamp is covered by a solid box in both images, so it no longer counts.
The catch
Watch
When the card shifted by 2 px, the masked check reported more changed pixels, 3,824 against 3,254, because the mask box moved too.
Source: our run, Playwright 1.64.1, Chromium and Firefox, Windows 11, 29 October 2026.

Mask only what changes on purpose: dates, live prices, adverts, user avatars, animated charts. Every mask is a part of the page you have stopped testing. Playwright also disables CSS animations and hides the text caret by default when it takes a screenshot, which removes two other common sources of noise.

Different browsers, different pixels

We compared the Chromium baseline of the unchanged card with the Firefox baseline. At the default threshold, 1,304 of 129,600 pixels differed, about 1%, from font rendering alone.

Figure 4 · Across browsers
Same page, same machine, different pixels
We compared the Chromium baseline with the Firefox baseline of the unchanged card. Font rendering alone separated them, so each browser needs its own baseline.
Threshold 0
3,249 px of 129,600 differ (2.51%)
Threshold 0.1
2,596 px of 129,600 differ (2.00%)
Threshold 0.2 (default)
1,304 px of 129,600 differ (1.01%)
Source: our run, Playwright 1.64.1, Chromium and Firefox, Windows 11, 29 October 2026; pixelmatch 7.2.0, the comparator Playwright uses.

That is why Playwright names baselines by browser and platform, such as card-chromium-win32.png. Its guide warns that rendering "can vary based on the host OS, version, settings, hardware, power source", and recommends running tests "in the same environment where the baseline screenshots were generated". In practice, generate baselines in the same container your CI pipeline uses, not on a developer laptop.

Pages too large to review

A full-page screenshot of a long page produces a diff that nobody can read. Compare components instead: a header, a product card, a checkout summary. Smaller images give smaller, clearer diffs, and a failure points straight at the part of the page that changed.

In Playwright, the same assertion works on a locator as well as a page. Point it at one element, and only that element is captured and compared:

await expect(page.locator(".card")).toHaveScreenshot("card-only.png");

We ran that line against the same changes. It passed on the unchanged page and failed on the hidden button with the same 5,889 changed pixels. On the padding change it failed before comparing a single pixel: "Expected an image 300px by 231px, received 300px by 235px." A change in an element's size is often the clearest sign of a layout problem.

Component screenshots also survive unrelated changes elsewhere on the page. A new footer link will not fail the product card test, so the failures you do see are about the component you are looking at. Name each snapshot after the component and state it shows, such as basket-with-discount.png, so a failing diff explains itself before anyone opens it.

What visual testing will not tell you

A visual test answers one question: does the page look the same as the approved baseline? It does not ask whether the baseline was right.

Our own card showed this. When we checked its colours against WCAG 2.2, the small grey timestamp, #777777 on white, measured 4.48:1. Success criterion 1.4.3 requires "a contrast ratio of at least 4.5:1" for normal text. We did not pick that grey to fail; we found it while checking. Every visual check in the experiment approved it, because it matched the baseline.

The rest of the card passed comfortably: the description at 7.46:1, the heading and price at 17.10:1 and the button text at 17.10:1. The lesson is about scope. Pair visual tests with accessibility checks, and review a new baseline with the same care as a design review, because whatever you approve becomes the standard every later run defends.

Plan which screens to cover

You cannot baseline every state of every page, so choose. Start with the journeys that earn money or cause support tickets: sign-up, search, product pages, basket and checkout. Then add the screens most exposed to change, such as pages where marketing teams add banners.

Mapping journeys before you write tests helps here. Some teams sketch them with AI-powered storyboarding tools to agree which states matter, such as an empty basket, a basket with a discount and a failed payment. Each agreed state becomes one screenshot test.

Visual checks also matter outside the website. Marketing emails render differently in each email client, and visual testing of templates catches broken layouts before a campaign goes out.

Visual testing tools in 2027

The earlier version of this post recommended seven tools. We checked each one in October 2026, and two no longer exist.

Figure 5 · Tool check
Two tools on the old list no longer exist
The earlier version of this post recommended seven tools. We checked each one in October 2026.
TestProject
Shut down
End of life on 31 March 2022.
Wraith (BBC)
Archived
Repository archived 16 January 2026; "no longer maintained".
Percy
Part of BrowserStack
Acquired by BrowserStack in July 2020; hosted review of visual changes.
Applitools
Current
Commercial visual AI comparison for web and mobile.
Playwright
Built in
toHaveScreenshot() compares against stored baselines; used for this post.
Cypress
Plugins
Captures screenshots; comparison comes from visual testing plugins or services.
Selenium, Puppeteer
Screenshots only
Take screenshots; you add a comparison library or a service.
Source: TestProject end-of-life notice via Katalon; github.com/bbc/wraith; BrowserStack announcement 9 July 2020; playwright.dev; docs.cypress.io.
  • TestProject reached end of life on 31 March 2022, according to Katalon's migration guide.
  • Wraith, the BBC's screenshot comparison tool, has a repository archived on 16 January 2026 and marked "no longer maintained".
  • Percy has been part of BrowserStack since BrowserStack announced the acquisition on 9 July 2020.

If your stack already uses Playwright, its built-in comparison is the quickest start, as this experiment shows. Cypress captures screenshots, and its own documentation describes comparison through visual testing tools and services rather than a built-in command. Selenium and Puppeteer take screenshots too, but you add the comparison yourself or through a service.

ToolHow it comparesReview and approvalStatus in October 2026
PlaywrightBuilt-in toHaveScreenshot() against baselines in your repositoryDiff images in the test report; approve by updating baselinesMaintained, version 1.64.1
PercyHosted comparison across browsersShared web review with approvalsPart of BrowserStack since 2020
ApplitoolsHosted visual AI comparisonShared web review with approvalsMaintained, commercial
CypressScreenshots; comparison through plugins or servicesDepends on the plugin or serviceMaintained
Selenium, PuppeteerScreenshots onlyYou build it or add a serviceMaintained
TestProjectNo longer availableNoneEnd of life, March 2022
WraithScreenshot comparison from the command lineNoneArchived, January 2026

Hosted services such as Percy and Applitools add what a code-only setup lacks: a shared review screen, approval workflows and history. Choose one when several people need to review changes, or when you need many browsers and devices without maintaining them yourself.

Automation testing suites gain the most when visual checks run in the same pipeline as the functional tests, so one build reports both kinds of failure.

Also Read: Different Techniques for AI Chatbot Testing

The principles that keep visual tests useful

Most visual suites that teams abandon fail for the same reasons: too many false alarms and no one responsible for the review. These principles, each shown in the experiment above, prevent both.

  1. Control the environment. Run every comparison in the same browser version, operating system and screen size as the baseline. Our two browsers differed by about 1% on an unchanged page.
  2. Make the state repeatable. Fix the test data, freeze or mask anything time-based, and let the tool disable animations.
  3. Compare small, meaningful areas. A component screenshot fails for one reason; a full page fails for ten.
  4. Keep the default threshold until you have a reason. Tighten it only where exact colour matters.
  5. Prove each check can fail. Break the page once on purpose and confirm the test goes red.
  6. Give every diff an owner. Decide who approves baseline changes, the same way someone approves code.

Before you trust a visual test

From our work
Building this experiment, our first version of the "hidden button" change did not hide the button at all. The banner sat about 49 px below it. The functional check passed because nothing was wrong, and we only found out by measuring where each element sat on the page.
The lesson carries over to client work, stated here as an observation rather than a measured rate: before you trust a visual test, prove it can fail. Break the page on purpose once and watch the check go red.
Source: our run, Playwright 1.64.1, Chromium and Firefox, Windows 11, 29 October 2026; geometry.json from the first and second runs.

Our first attempt at the hidden-button change was wrong. The banner sat below the button, so the functional check passed for a good reason, and we nearly reported it as a missed defect. We caught it only by measuring the position of each element. Prove your own visual tests the same way: break the page on purpose once, and confirm that the check goes red for the reason you expect.

Make visual testing part of every release

Add visual checks where a broken look costs you most, start with default settings, mask only what changes on purpose and keep one baseline per browser and environment. Review every diff, and update baselines only for changes you meant to make.

If you want help setting up visual testing alongside your functional suite, QAble works as a leading QA testing company and QA Consulting Company in India for product teams that need both.

Frequently Asked Questions

What is visual testing?

Visual testing checks how an application looks, not just whether it works. A test captures a screenshot of a page or component and compares it with an approved baseline image. If too many pixels differ, the test fails and a person reviews the change. It catches layout shifts, overlapping elements and wrong colours that functional tests pass.

Why is visual testing important?

Because a page can work and still look broken. In our test, a promo banner hid the Add to basket button completely, yet the functional check passed in Chromium and Firefox. The visual check failed at once, with 5,889 pixels changed. Without it, users would have seen a page with no way to buy.

What are the cons of visual testing?

Visual tests raise false alarms when content changes on purpose, such as dates, prices or adverts, unless you mask those elements. Baselines differ between browsers and operating systems, so each needs its own set. Strict settings flag changes no one can see, and every failure needs a person to review it.

What are the crucial tools for visual testing?

Playwright has screenshot comparison built in through toHaveScreenshot(). Percy, now part of BrowserStack, and Applitools are hosted services with review workflows. Cypress, Selenium and Puppeteer capture screenshots and rely on plugins, libraries or services for comparison. TestProject and BBC's Wraith, often listed in older guides, are no longer available or maintained.

How do you stop visual tests from failing on dynamic content?

Mask the elements that change on purpose. In Playwright, pass them to the mask option, and they are covered with a solid box before the comparison. In our test, a live timestamp failed every run until we masked it, after which the check passed in both browsers.

Should visual baselines be shared across browsers?

No. We compared Chromium and Firefox screenshots of the same unchanged page and found 1,304 pixels different at the default threshold, from font rendering alone. Keep one baseline per browser and platform, and generate them in the same environment your pipeline uses.

Free Assessment

Get a free QA audit for your project

Identify quality gaps before they become production bugs.

Get Free Audit

Ship software with confidence

Talk to a QA advisor and find out how QAble can help your team build quality in at every stage.

No sales pitch
Technical walkthrough
No lock-in commitment

Talk to QA Advisor

Direct access to QAble's QA specialists.

Response within 24 hours