All articles

End-to-End Testing with AI: What Actually Changes

End-to-end testing with AI, explained honestly: the three main approaches, where AI helps, where it still fails, and a checklist to try it on your own app.

Most teams that ask about end-to-end testing with AI are not starting from zero. Either they have a suite of browser tests that took months to write, breaks after every redesign and is trusted a little less each sprint, or they have no suite at all because nobody had time to build one. The question is whether a model can now write those tests and keep them working. The honest answer is "partly", and the useful part of the answer is knowing which part. This article covers the three main approaches, where AI genuinely reduces the work and where it doesn't, and a checklist for trying it on your own application.

If you need the fundamentals first, start with End-to-End Testing: What It Is and How to Do It Right. In short, an end-to-end test drives the real application through the browser, the way a user does, and checks that a complete journey produces the right outcome.

Why maintenance, not authoring, is the real problem

End-to-end tests give the strongest signal that a product works, and they are also the most expensive tests to keep. Ham Vocke's The Practical Test Pyramid on martinfowler.com describes them as notoriously flaky, slow to run and costly to maintain. It recommends keeping their number to a bare minimum and spending them on "user journeys that define the core value of your product".

Flakiness is not a small-team problem. In a 2016 post on the Google Testing Blog, John Micco reported that almost 16% of the tests across Google's test corpus showed some level of flakiness, and that about 84% of the pass-to-fail transitions their CI observed involved a flaky test. When most red builds are noise, people learn to ignore red builds.

That is the real reason teams are looking at AI. The cost of an end-to-end suite is rarely the first version of each test. It is the tenth version: the selector that changed in a redesign, the new consent dialog, the test account that expired. Any tool worth evaluating has to reduce that recurring cost, not just make the first draft faster. We covered the causes in Flaky Tests: Why End-to-End Suites Break and How to Fix Them.

For product managers there is a second cost: if only two engineers can change the suite, it covers whatever they had time for.

Three approaches to end-to-end testing with AI

"AI testing" covers tools that work very differently. Most fall into three groups, and many products combine them.

1. AI-assisted code in a test framework

The output is ordinary test code in Playwright, Cypress or Selenium, written with help from a model, either a coding assistant or features built into the framework. Playwright, for example, documents three test agents: a planner that explores the app and writes a Markdown test plan, a generator that turns the plan into Playwright tests and checks selectors and assertions against the live app, and a healer that runs failing tests, suggests patches and re-runs them.

Playwright's test generator is a recorder rather than a model, but it is a useful baseline. It records your actions in the browser and picks locators by role, text and test id.

Good at: code you own, review in pull requests and run in any pipeline, debugged with tools engineers already know.

Bad at: someone still has to read and maintain that code. A model that writes a correct test in ten seconds can write a wrong one just as fast, and the review falls to the same engineers who were short of time. Even the codegen documentation suggests inspecting the generated file and improving it by hand where needed.

2. Plain-language test tools

Here the test is a description: a task and an expected result in ordinary sentences. The tool turns it into browser steps, either once (producing a scenario you can review) or every time it runs.

Good at: people who know the product but don't write code can create and read tests. Because the test states its intent, a reviewer sees what is supposed to be checked, not just which elements get clicked.

Bad at: language is ambiguous. "Check that checkout works" can be read many ways, and the tool will pick one. You also have less fine-grained control than with code.

3. Agents that drive a browser

Here a model decides at run time: it looks at the page, chooses an action, observes the result and repeats until it reaches a goal. Projects such as Playwright MCP give language models control of a browser through Playwright, working from structured accessibility snapshots of the page rather than screenshots.

Good at: exploration, adapting to a page that changed, trying unusual paths and investigating a failure.

Bad at: repeatability. Two runs can take different paths, and every step is a model call, which is slower and more expensive than replaying fixed steps. On their own, run-time agents make a weak release gate.

For a wider comparison of framework automation and AI-driven tools, see AI Testing vs Playwright: Different Layers, Not Rivals.

Where AI genuinely helps

Writing the first draft. Turning "a returning customer applies a discount code and pays with a saved card" into a dozen steps with inputs, waits and checks is mechanical work. Models do it well, especially when they can look at the live page instead of guessing at its structure.

Locator resilience. A common reason a working test breaks is that the element it clicks changed: a regenerated class name or a reworded button. Playwright's best practices already recommend user-facing attributes over CSS or XPath selectors, because the DOM changes easily. Many tools add fallbacks on top: if the stored locator fails, find the element by its other characteristics, and only then ask a model which element was meant. This kind of "self-healing" removes a lot of noise, as long as every repair is recorded somewhere a person can see it.

Failure explanation. A failed run produces a screenshot, a step log, console errors and network responses. Working out from all that whether the product or the test broke is slow. A model can summarise it, for example "the payment request returned a 500 error after the coupon was applied", so the first person to look starts from a hypothesis instead of a raw trace.

Test data. Unique email addresses, realistic postal addresses, names with apostrophes, boundary values for quantity fields. Models generate varied input easily, and fresh data per run stops tests from colliding with each other.

Where AI does not help

Deciding what matters. A model can list everything a user could do on a page. It cannot know that the annual-plan upgrade carries most of your revenue, or that the export feature broke twice last quarter. Choosing the handful of journeys that deserve an end-to-end test is a product and risk decision.

Non-determinism. A model can produce different output for the same input. If it makes decisions at run time, the same test can pass and fail against the same code, which is exactly how Google defines a flaky result. Scenarios that are generated once, reviewed and then replayed contain this risk. Agents that improvise on every run do not.

CAPTCHA and bot protection. A CAPTCHA exists to stop automated browsers, and a well-behaved test tool should not try to defeat it. Instead, use your CAPTCHA provider's test keys or switch the check off in staging, and keep production protected.

Unclear expected results. If nobody can say what the correct outcome is, no tool can check it. "The order goes through" is not a check. "The confirmation page shows an order number and the total equals the cart total plus shipping" is. AI makes this problem more visible, not smaller: a vague prompt produces a confident, vague test. Our guide on writing prompts for test generation covers how to state outcomes precisely.

Common mistakes with AI-powered end-to-end testing

Evaluating on a demo app. Every tool looks good on a to-do list or a vendor's sample shop. What matters is your login, your dynamic forms, your third-party widgets and your slow staging server.

Counting generated tests. A hundred unreviewed tests are a hundred unknowns. Ten tests that cover your critical journeys, each with a precise expected result, are worth far more. The test pyramid's advice to keep end-to-end tests few still holds when they become cheap to write.

Skipping review. Generated steps can look right and check the wrong thing, such as asserting that a page loaded instead of that an order exists. Read every generated test once before you trust it.

Letting repairs happen silently. Automatic repair is useful when you can see what changed. Playwright's documentation notes that its healer agent can finish with a skipped test when it believes the functionality is broken. That is a judgement about your product, and a person should confirm it, whichever tool makes it.

Expecting a model to fix a broken environment. If staging goes down twice a week or tests share mutable data, smarter element lookup will not make the suite reliable. The environment is still your job.

Running it against production with real accounts. Tests that create orders, send emails or change settings need isolated identities and data. An agent exploring an admin panel will eventually find the delete button.

How to test a web application with AI: evaluate tools on your own app

A two-week trial on your own application tells you more than any feature comparison. Our buyer's framework for AI testing tools explains the categories; this checklist is for the hands-on part.

  1. Pick three to five real journeys. Include one that requires signing in, one that sends an email and one that has broken in production before.
  2. Write the expected result for each before you start. Observable outcomes only. This becomes your scoring sheet.
  3. Measure time to a test you trust, including review and corrections, not time to the first generated test.
  4. Read what was generated. Are the checks on outcomes (an order number, a balance, an email) or only on pages loading?
  5. Run each test ten times without changing anything. The results should be identical. Any variation here comes from the tool, not your app.
  6. Change the UI on purpose. Rename a class, move a button or reword a label in staging. Does the test still find the element, and does it tell you it had to look harder?
  7. Break something on purpose. Introduce a real bug, such as a wrong total or a disabled submit button. If the test still passes, nothing else on this list matters.
  8. Judge the failure report. From the report alone, can someone see which step failed, what the page looked like and whether the product or the test is at fault?
  9. Check the practical edges. Authentication, test identities and email, file uploads, iframes, payment test mode, CAPTCHA in staging, and how runs are started.
  10. Work out the running cost and what you own. Cost per run at your expected volume, and what you keep if you stop using the tool.

Can I use AI to test my website?

Yes, with conditions. You can use AI to generate and run end-to-end tests for journeys you can describe with a clear expected result, on an environment you control, with a person reviewing what was generated before it counts. That covers much of what web teams need: sign-up, sign-in, search, checkout and key forms.

It is not a replacement for unit and integration tests, for deciding what to test or for a proper test environment. It will not get past a CAPTCHA, and it should not.

If you are working out how to test a web application with AI for the first time, start small: one journey, written as a task plus an expected result, run every day for two weeks. You will learn more from that than from a broad rollout.

What changes for QA engineers and product managers

The work moves rather than disappears. Less time goes into writing selectors and repairing them after each redesign; more goes into choosing which journeys matter, writing precise expected results, reviewing generated tests and investigating real failures. For product managers, coverage no longer depends entirely on engineering capacity: if you can describe a journey and its outcome precisely, you can contribute a test. The skill that matters most in both roles is the one a model cannot supply: knowing what "correct" means for your product.

Where BuniOD fits

BuniOD follows the plain-language approach. You add your web app by URL and write a flow as numbered plain-language steps and an expected result. BuniOD works through those steps in the live app, matching each one to an element, to build a browser scenario with test data and checks, and a person reviews and confirms it before it runs. If it isn't right, you adjust the input values or regenerate it from an updated prompt.

Confirmed scenarios run in headless desktop Chromium, on demand or once a day at a time you choose. Each run keeps step and check results, screenshots, console and network logs, and an explanation when something fails. Element lookup falls back from the stored locator to an element fingerprint, and only then to model-based matching. Signed-in flows work through HTTP basic auth or test identities with their own inbox, and business processes run several scenarios in order. Runs start on demand or on the daily schedule, not from a deploy pipeline. The platform page shows how the pieces fit together.

Conclusion

End-to-end testing with AI is useful when you are clear about which job you are handing over. Models are good at drafting steps, finding elements that moved, generating test data and explaining failures. They are not good at deciding what matters, staying repeatable when they improvise, getting past bot protection or checking an outcome nobody defined. Choose an approach (framework code, plain-language scenarios or run-time agents) based on who will maintain the tests and how much repeatability you need. Then test it on your own app with the checklist above, and don't skip the deliberate bug.

Newsletter

Quality intelligence, in your inbox

Occasional, high-signal writing on AI testing and release quality. No spam.

You're subscribedThanks — we'll be in touch when the next piece is out.

We'll only email you about new articles. Unsubscribe anytime.

Get started

Turn a described flow into a browser scenario

Connect your application, write the steps of the flow you want to verify, and review the scenario BuniOD builds.

Start free