Skip to content

Blog

AI testing agents: what they do and what they won’t replace

In short

An AI testing agent walks through the app on its own, plans scenarios, writes tests and tries to repair the ones that stopped passing. It speeds the work up, but it does not decide what matters and needs a person to approve changes.

Automated tests have one flaw: someone has to write them, and then fix them after every change in the app. AI agents promise to take over part of that work. It is worth knowing what exactly they do before you start trusting them.

How an agent differs from a script

Anthropic separates two approaches. In a workflow, the model and the tools are led along a path written in advance in code. In an agent, the model itself decides the next steps and how to use its tools (Anthropic, "Building effective agents"). In testing, that is the difference between a script that does exactly what it was told, and an agent that walks through the app itself, decides what to check and reacts to what it sees.

What it looks like in practice

A good example is Playwright's official test agents. The documentation describes three roles that can be used separately or in one loop (Playwright, Test Agents):

AgentWhat it does
Plannerexplores the app and writes a test plan in a Markdown file
Generatorturns the plan into Playwright test files and checks selectors and assertions against the live app
Healerruns the test suite and tries to repair the tests that fail

They are set up with one command (npx playwright init-agents) for the tool you choose, for example VS Code, Claude, Codex or OpenCode. The agent definitions are tied to the Playwright version, so after an update they have to be generated again.

Where an agent helps

  • A first draft. Exploring the app and planning tests is the tedious part. The agent does it quickly, and you just correct it.
  • Routine tests. Repetitive scenarios (sign-in, forms, lists) are a good fit for generation.
  • Maintenance. When the interface changes, an agent can repair broken tests instead of waiting for a person.

What an agent will not replace

  • Deciding what matters. Which paths are critical to the business is known by the team, not the model.
  • Judging whether a change is a bug or a new feature. The Playwright documentation says plainly that the healer ends with either a passing test or a skipped one, if it decides the feature is broken. If it "fixes" a test so that it passes despite a change in behaviour, you get a green result over a broken flow. That is why a person should approve every fix.
  • Quality from the start. Playwright notes that generated tests may contain initial errors.
  • Free operation. Anthropic points out that agentic systems often trade latency and cost for better performance, and that autonomous agents carry the risk of compounding errors and call for testing in a sandbox, with guardrails.

How to start sensibly

  1. Start with one path, such as sign-in or payment, not the whole app.
  2. Give the agent a stable starting point: a starter test that sets up the environment (Playwright calls it a "seed test").
  3. Every change to the code goes through a person. The agent proposes, the team approves.
  4. Measure the effect: how long test maintenance takes, how many tests are flaky and how many real bugs you catch.
  5. Simpler first. Anthropic advises finding the simplest solution and adding complexity only when needed. Sometimes a well-written test framework built with AI is enough.

If you are wondering whether agents fit your team, I describe how I introduce them on the Testing and consulting page.

Sources

Questions

Will an AI agent replace a tester?

No. It takes over the repetitive part: exploring, drafting a plan, writing routine tests and maintaining them. It leaves the decisions about what matters, and whether a change is a bug, to a person.

Where should I start with AI agents in testing?

With one critical path, such as sign-in or payment, a stable starter test and a person approving every change. Widen the scope only after that.

Want to talk it through one-on-one?

I usually reply within 2–3 business days.