Short answer: Functional testing proves the app works: a test clicks through a flow and checks the result, such as an order total. Visual testing proves the app looks right: it compares screenshots against an approved baseline and flags changes. Start with functional tests on the flows that matter, then add visual checks where looks drive trust.

You ship a museum ticketing app. On Friday, every functional test passes: visitors pick a date, add two tickets, pay and get a QR code. On Saturday, a visitor emails a screenshot. On her phone, the price sits on top of the "Buy" label, and in dark mode the ticket date is black on black. Nothing was broken, according to the tests. Everything was broken, according to her.
The reverse also happens. A screenshot check passes while the student discount applies twice. Each test type is blind where the other one sees. Here is where each belongs.
In this guide, you'll learn:
- Definitions
- Visual vs functional testing, side by side
- When to choose visual testing
- When to choose functional testing
- Where an AI software factory fits
Use the sections below as your playbook.
Definitions
Functional testing checks behavior. A test opens the app, performs actions and asserts on outcomes: an element appears, a total is correct, an email is queued, a record is saved. End-to-end tests are the widest form; they run a whole user journey through the real UI. Frameworks such as Playwright and Cypress are built for this. Playwright drives Chromium, Firefox and WebKit through one API, with auto-waiting and retrying assertions (Playwright). Cypress runs end-to-end and component tests in a real browser, locally or in CI (Cypress).
Visual testing checks appearance. A tool captures a screenshot of a page or component, compares it to an approved baseline and flags differences for a person to accept or reject. In Playwright, toHaveScreenshot() generates reference screenshots on the first run and compares against them after that (Playwright docs). Dedicated services add smarter comparison and review workflows. Applitools Eyes uses "Visual AI" for "visual and functional testing of your web and mobile applications" (Applitools). BrowserStack sells Percy and App Percy for visual testing, with a free Percy tier of 5,000 screenshots a month, as of November 2026 (BrowserStack; BrowserStack pricing).
The line is thinner than it was. Most platforms now sell both. Applitools Autonomous creates and runs "functional, visual, and API tests" (Applitools). BrowserStack's Test Companion agent works across functional, visual, accessibility and API testing (BrowserStack press release). mabl runs web, mobile and API tests in one suite, and local Playwright runs use mabl credits only for visual assertions (mabl platform; mabl pricing). The methods are still different. They answer different questions.
Visual vs functional testing, side by side
| Aspect | Visual testing | Functional testing |
|---|---|---|
| Question it answers | Does it look the way we approved? | Does it do what it should? |
| How it checks | Screenshot compared to a baseline | Actions plus assertions on elements, values and state |
| Catches | Overlaps, broken layout, wrong colors, missing icons, font changes | Wrong totals, broken buttons, failed saves, bad redirects, rule errors |
| Misses | Logic errors behind a correct-looking screen | Anything no assertion checks, including most layout bugs |
| Main source of noise | Rendering differences across OS, browser and hardware | Flaky timing, brittle selectors |
| Needs a human to | Approve new baselines after intended changes | Write and update the assertions |
| Cross-browser value | High; rendering differs by browser | Medium; behavior usually matches |
| Example tools | Playwright toHaveScreenshot, Applitools Eyes, Percy | Playwright, Cypress, mabl |
Sources: Playwright docs: visual comparisons; Applitools; BrowserStack; Cypress; mabl.
The noise row decides how much a team trusts each suite. Playwright's docs are frank: "Browser rendering can vary based on the host OS, version, settings, hardware," and screenshots "differ between browsers and platforms due to different rendering, fonts and more." Their advice is to run visual tests in the same environment that produced the baseline (Playwright docs). Applitools takes a different route: it pairs a "Deterministic Language Model" with Visual AI so runs are repeatable (Applitools).
Pricing shapes usage, too. Applitools prices per page, where a page is "a unique validation that is created in the test code," and lists no public prices (Applitools pricing). Cypress Cloud prices by recorded test results; Starter is free with 500 results a month, as of November 2026 (Cypress pricing). Playwright is free and open source, but you host the runs and CI yourself (Playwright).
When to choose visual testing
- Looks are the product. Marketing pages, storefronts and booking screens lose trust when they look broken, even if they work.
- You support many browsers and devices. Rendering differs across them, and BrowserStack runs tests on 3,500+ browsers and tens of thousands of real devices (BrowserStack). A functional suite rarely checks what each one draws.
- You have a design system. Component-level screenshots catch a shared button or card that changed everywhere at once.
- CSS changes are frequent. Theme work, dark mode and responsive tweaks break layouts without breaking logic.
- AI agents edit your UI. Applitools launched "Visual AI Guardrails" for agentic coding workflows on Sep 15, 2026, to catch quality drift in code that agents write (Applitools news).
Know the limits. Every intended design change needs a person to approve new baselines. A pixel-perfect screen can still hide a wrong price.
When to choose functional testing
- Money or data moves. Payments, refunds, sign-ups and record changes need assertions on the result, not a picture of it.
- Business rules matter. "Students get a discount once per order" is invisible in a screenshot. Only a logic assertion checks it.
- You need a regression gate in CI. Cypress Cloud adds Test Replay, flake detection and failures-first orchestration (Cypress). Playwright runs in parallel by default and supports sharding (Playwright).
- You want tests written by agents. Playwright's Test Agents include a Planner that explores the app and writes a test plan, a Generator that turns the plan into tests, and a Healer that repairs failing tests (Playwright Test Agents). mabl authors tests from inputs such as Jira requirements and heals broken steps (mabl).
- Your app has few screens but deep logic. Internal tools, APIs and back-office workflows rarely justify screenshot baselines.
Know the limits. A functional test only knows what it asserts. If no line checks that the price is readable, a broken layout passes.
The common setup layers them. Functional tests run on every change and block the merge. Visual checks run on key pages and components, and a person reviews diffs. Both run in the same CI job when the tool supports it.
Where an AI software factory fits
Both test types assume someone already decided what "right" means. For the museum app, which flows matter? Timed entry, member discounts, group bookings? A test suite inherits whatever gaps the plan had.
Testing tools check the code you already have. Coding agents automate the developer. Devfab automates the development lifecycle. It is a software factory where AI agents research, plan, build, test and deploy, and a person approves the plan.
- Research before the plan. The Researcher maps key terms, best practices and competitors for the domain, then suggests a prototype. For ticketing, timed-entry slots and capacity limits reach the plan before code does.
- The QA agent tests UI, flows and logic. It runs UI and flow tests, clicking screens, buttons and user journeys end to end, plus logic tests. Picking a slot, paying and getting a ticket is a flow test. "No more tickets than capacity" is a logic test.
- ChainFlow shows impact. It maps which functions and APIs call each other and what is deployed. A change to pricing shows its effect on checkout, receipts and capacity counts.
Devfab is not a visual regression service. If you need baseline screenshots across thousands of browsers and devices, Applitools or Percy is the right tool, and the code Devfab writes lives in your own GitHub account, so you can add either one. Devfab is in Beta, has a smaller community and fewer integrations than mature testing platforms, is not an editor for hands-on coding, and needs a GitHub account. Cost is predictable: it is logged after each run, per task and per project.
For how unit and end-to-end tests split the work, read unit tests vs end-to-end tests for AI-generated code.
FAQ
What is the difference between visual testing and functional testing?
Visual testing compares what a screen looks like against an approved baseline image and flags differences. Functional testing drives the app, clicking buttons and filling forms, then asserts that the right result happened. One proves the page looks right. The other proves the feature works.
Can functional tests catch visual bugs?
Only some. A functional test asserts on elements and values, so it can pass while text overlaps, colors break or a layout collapses on one browser. Unless an assertion checks it, a visual problem stays invisible to the test. That gap is why visual checks exist.
Why do visual tests produce false failures?
Rendering differs by environment. Playwright's docs warn that browser rendering can vary with the host OS, version, settings and hardware, and advise running visual tests in the same environment that made the baseline. AI-based tools such as Applitools Eyes aim to ignore differences a person would not notice.
Which should a team add first?
Functional tests, for the flows that earn money or carry risk, such as sign-up, checkout and payments. Add visual checks next for the pages customers see most and for apps that must look right across many browsers and devices. Both can run in the same suite.
Read next
Get UI, flow and logic tests planned with the app, not after it. Try Beta
Sources (checked November 2026): Playwright; Playwright docs: visual comparisons; Playwright Test Agents; Applitools; Applitools pricing; Applitools news; BrowserStack; BrowserStack pricing; BrowserStack Test Companion press release; Cypress; Cypress pricing; mabl AI test automation; mabl pricing.
Frequently asked questions
What is the difference between visual testing and functional testing?
Visual testing compares what a screen looks like against an approved baseline image and flags differences. Functional testing drives the app, clicking buttons and filling forms, then asserts that the right result happened. One proves the page looks right. The other proves the feature works.
Can functional tests catch visual bugs?
Only some. A functional test asserts on elements and values, so it can pass while text overlaps, colors break or a layout collapses on one browser. Unless an assertion checks it, a visual problem stays invisible to the test. That gap is why visual checks exist.
Why do visual tests produce false failures?
Rendering differs by environment. Playwright's docs warn that browser rendering can vary with the host OS, version, settings and hardware, and advise running visual tests in the same environment that made the baseline. AI-based tools such as Applitools Eyes aim to ignore differences a person would not notice.
Which should a team add first?
Functional tests, for the flows that earn money or carry risk, such as sign-up, checkout and payments. Add visual checks next for the pages customers see most and for apps that must look right across many browsers and devices. Both can run in the same suite.



