Skip to content
All articles

Guides~6 min read

How Many End-to-End UI Tests Do You Need With AI Code?

How many end-to-end UI tests do you need when AI writes the code? Size them by user journeys, roles and platforms, not code volume. See where unit tests stop.

TL;DR

AI makes code and unit tests cheap, but the number of user journeys your app has does not shrink. Size end-to-end UI testing by journeys, roles and platforms, not by lines of code. Unit tests check the parts; running the real app is how you check what a user actually experiences.

Key takeaways

  • Journeys set the count: The right number of end-to-end tests follows your user journeys, roles and platforms, not how much code AI wrote.

  • Cheap tests are not independent tests: A unit test generated from the code can confirm what the code already does.

  • The pyramid still holds: Keep a wide base of fast tests, but do not let a cheap base talk you out of the top layer.

  • Maintenance scales with surface area: Brittle UI scripts tend to cost more as the app grows, which is one reason teams may under-invest at the top.

  • A different approach exists: TaloTrace, a QA testing tool for web, iOS and Android apps, explores the running app, proves goals were completed, and reviews findings before you see them.

What Does the Symptom Look Like Week to Week?

Your team ships faster than it used to. Pull requests arrive with generated code and generated unit tests, and the unit suite is green. Coverage reports look healthy.

Then a bug report comes in. A checkout button does nothing on one screen size. A role that can see a menu item cannot open the page behind it. The unit tests all passed, because each function did what its test said it should.

Meanwhile the few end-to-end tests you own are a chore. They fail for reasons unrelated to bugs, and someone reruns them. The team starts to treat red as noise, and few people add more, because adding more means maintaining more.

Why Do Cheap Unit Tests Leave the Gap Open?

Cheap unit tests leave the gap open because they check parts, not the assembled app. A unit test is a check of one piece of code against an expectation, while an end-to-end UI test is a check that a real user journey works in the running app. When both the code and the test come from the same prompt or the same model, the expectation can be derived from the implementation, a pattern some practitioners have described in their own write-ups. The test then confirms the code does what the code does, which is a weaker statement than the app does what a user needs.

There is also a structural limit. A user does not touch functions. They touch an assembled app: navigation, state carried between screens, permissions, layout on their device. Defects at those seams do not live inside any one unit, so more unit tests are unlikely to surface them.

AI-written code raises the stakes at the seams. More code changes per release, written faster, with less of it held in any one person's head. The pieces may each be fine while the whole drifts.

Why Does the Top of the Pyramid Stay Thin?

The top of the pyramid stays thin because scripted UI tests are expensive to keep alive. A scripted test encodes how the screen is built: element IDs, selectors, the order of steps. That structure was never promised to be stable, so a redesign breaks tests that describe behaviour nobody changed.

Script maintenance tends to grow with the surface area of the app, not just the count of tests. Each new screen adds paths that need scripts, and each UI change can invalidate the ones you have. Faster code generation widens that surface faster, so upkeep can outpace the people available to do it.

So some teams ration the top layer. That is rational when the tests are expensive to keep alive. It is also risky, because the top layer matters most when a cheap base gives a weaker signal on its own.

How Many End-to-End UI Tests Do You Actually Need?

You need one end-to-end test for each critical journey on each role and platform that matters to your users, not a fixed ratio to your unit tests. We cannot give you a ratio, and a number with no source would only look authoritative. What you can do is count the right things:

DimensionWhat to countWhy it changes the number
Critical journeysSign-up, sign-in, the core action, anything involving money or irreversible dataEach one needs its own end-to-end check
RolesAdmin, regular user and any other role with different screensThe same journey can be a different test per role
PlatformsWeb, Android, iOSA journey passing on one platform does not prove it on another

Combine the three, keeping only the pairings that apply to your product, and you have a defensible floor. It will be small next to your unit test count, and that is fine; the pyramid shape survives. The point is that the floor is set by your product's journeys, so it does not fall just because generating code and unit tests got cheaper.

What Do Teams Usually Try, and Where Does It Run Out?

Several approaches are common, and each has a limit:

  • More unit tests: cheap to produce, but they have a hard time seeing the assembled app, as above.
  • Hand-maintained UI scripts: they check the real app, but upkeep grows with every screen you add.
  • Manual regression passes: they catch what scripts miss, but they take time and attention that can shrink as release frequency rises.
  • Doing nothing at the top: it costs nothing until a seam bug reaches users.

None of these is foolish. They are each a trade between coverage of the real app and the effort to keep it covered, and with AI-paced releases that trade can get harder to win by hand.

What Does a Different Approach Look Like?

The goal is to keep the top layer without paying script-maintenance rates for it. That means tests that describe what a user is trying to do rather than how a screen is built, and that check the outcome rather than assume it.

TaloTrace is a QA testing tool for web, iOS and Android apps, ; see how TaloTrace tests your app. You point it at your app and, if you like, describe the flow you care about most in plain language, such as completing a checkout. TaloTrace explores the running app, plans the user journeys worth testing, drives each one to a verifiable outcome, and turns the journeys it completes into replayable scenarios. There are no test scripts to write.

What Makes TaloTrace Different for Testing AI-Written Apps?

Three properties map to the problems above, and we will stay with those rather than claim more.

  • It navigates by sight: TaloTrace looks at the screen instead of relying on brittle element IDs, so it can keep working when the UI changes. Its interaction range covers taps, typing, scrolling, swiping, long-press, double-tap, drag and pinch.
  • Completion is proven: a goal counts as done only when a machine-checkable predicate shows the outcome, false before the action and true after. A screen that already says "Projects" cannot falsely complete a "create project" goal, and a scan that produces no independently proven goal fails rather than reporting a pass.
  • Findings are reviewed: TaloTrace separates finding a bug from reporting it, and independently verifies each finding before it reaches you. Each carries a screen recording window, its reasoning and step-by-step reproduction in the Evidence panel.

Beyond those three properties, a few practical details matter for the counts above:

  • Platforms: it runs on a cloud-hosted browser, Android emulator or iOS Simulator, chosen from your app's platform.
  • Triggers: you can start a run on demand from the app or the API, or put it on a daily or weekly schedule so it keeps testing the latest finalised build.
  • Roles: you can save test logins with role labels such as admin and viewer, which covers the roles dimension from the count above. Our guide to testing role-based permissions across admin and regular users goes deeper.

This does not mean tests never break or that review effort disappears. TaloTrace addresses the cost of keeping real-app coverage alive; deciding which journeys matter, and acting on what it finds, is still your team's judgement. If you want the platform-specific detail, our post on autonomous mobile app testing goes further.

How Do You Get Started?

List your critical journeys, roles and platforms first. That list is your floor, and it is useful whichever tool you use to cover it.

If you would like to see the top of your pyramid covered without writing scripts, talk to us.

Get early access or book a demo

Frequently asked questions

Is the testing pyramid obsolete now that AI writes code?

No. Fast, cheap tests at the base still catch a lot at low cost. What changes is that the base gets cheaper to fill, so the question becomes whether the top layer, which runs the real app, is keeping pace with how quickly the app changes.

Is there a ratio of unit tests to end-to-end tests I should aim for?

There is no ratio we can source, and a number without a source would mislead you. A better anchor is your list of critical journeys, multiplied by the roles and platforms that matter to your users.

Which platforms can TaloTrace run against?

TaloTrace runs in the cloud on a browser for web apps, an Android emulator for Android apps and an Apple iOS Simulator for iOS apps. The platform is chosen automatically from your app. Physical devices are not offered.

Do I have to write test scripts to use TaloTrace?

No. You point TaloTrace at your app and can describe the flow you care about in plain language. It explores the running app and turns the journeys it completes into replayable scenarios.

You build. TaloTrace tests.

Public testing is coming soon. You can request early access in the meantime.

Book a demo
Request early access