Testing the AI Tester (The Harness, the Prompt and the Model)

Bill Echlin
10 min read
Testing the AI Tester (The Harness, the Prompt and the Model)

Can an AI model run a manual test case as well as I can?

I’m not talking about writing and running an automated test script. I’m talking about reading a plain English, detailed test case specification and executing the test steps agentically.

I’ve been curious about this for a while. The models keep getting better, and I wanted to see how close they are to doing a tester’s job.

So I gave the same twelve test cases to four models. I ran the test cases by hand myself too.

Plain text. No scripts. The steps a manual tester would follow.

Most runs gave the same results as me.

Getting there took more testing than the tests themselves.

But, once we’d got there the results were impressive.

What I did

I wrote twelve test cases for a small web app (bit of help from AI but I reviewed and set the quality bar for the content). 63 steps in all.

It’s the manual testing screen from my last post, which has pictures of it. It isn’t complex. It isn’t a toy either. It has search, filters, forms, tabs and results that change as you work.

They read the way a manual test reads. Open this, choose that, check the total.

As an example this is one of the tests (the simplest one). Exactly the same test I ran and that I gave to the models.

# The header totals should describe the whole project when a search is active

## Test Objective

Check that the result totals in the page header count every test case
in the project, whatever the search box holds.

## Preconditions

- The manual tests page is open in the browser.
- The search box is empty and the filter by result shows All.

## Test Data

- Search word: balance
- Expected header totals: 3 passed, 1 failed, 1 skipped, 4 to run

## Test Steps

1. Type balance in the search box above the test case list.
   - Expected observation: The list shows two test cases.
2. Look at the result totals in the page header.
   - Expected observation: The header shows "3 passed", "1 failed",
     "1 skipped" and "4 to run", the totals for all 9 test cases
     in the project.
3. Clear the search box.
   - Expected observation: All 9 test cases are listed again and the
     header totals are unchanged.

## Expected Final Outcome

- While the search is active the header totals stay at 3 passed,
  1 failed, 1 skipped and 4 to run.

## Postconditions

- The search box is empty and the filter by result shows All.
  Nothing on the page has been changed.

Two were written to fail. One has the wrong wording in its expected result. The other asks for something the page can’t do.

One needs judgement. It asks “does the page make the first action clear”. A woolly test step open to interpretation.

I ran all twelve by hand first. Ten passed and two failed. That was the expected result. The baseline.

Then each model got the same twelve, with a browser it could drive and a short prompt. Nobody helped the agent while a run was going.

One set of test cases and five testers. Me by hand and four models, with every run's results compared.

Each model ran the set at least three times. The page was put back to exactly the same starting point before every run.

The set-up, briefly

Each run was one agent session in a terminal, with nobody steering it.

The agent had three things. The twelve test cases as text files, a one-page sheet on how to drive a browser, and a command line tool that handed over each test case and recorded its result.

The browser was Chrome, driven with the Chrome DevTools CLI tool. One command per action.

It starts a browser in a window you can watch.

chrome-devtools start --sessionId <id> --no-headless --isolated
chrome-devtools new_page "<the page's address>" --sessionId <id>

It reads the page as a list of headings, buttons and boxes, each with an ID.

chrome-devtools take_snapshot <page> --sessionId <id>

Then it acts on those IDs and saves a screenshot as evidence.

chrome-devtools click <page> <element> --sessionId <id>
chrome-devtools fill <page> <element> "balance" --sessionId <id>
chrome-devtools take_screenshot <page> --filePath "step-1.png" --sessionId <id>

That’s all the agent had to work with. No recorded script and no selectors written in advance.

It read the test case, looked at the page, and decided what to click.

The results

WhoRunsRuns that matched my resultsTime for one runCost of one run
A contract tester, by handabout 30 minutesabout £27
Sonnet 5.533about 7 minutesabout 70p
Opus 5.533about 10 minutesabout £1.90
Fable 5.233about 9 minutesabout £2.60
Haiku 5.541about 10 minutesabout 40p

The first row is an estimate. Twelve tests like these take about half an hour by hand, and I’ve costed that as a contract tester on £400 a day.

That’s quite scary.

Every run, on every model, failed the two tests that were meant to fail.

Every run passed the hardest test, ten steps of editing a test case and checking what changed.

On pass and fail, the models very nearly agreed with me and with each other.

The test that split them was the judgement test. This is the step that did it.

Without pressing anything, and using only what the Run tab shows, decide what to do first and what to do last to record a result.

Haiku failed it in three of its four runs. No other model failed it once.

There was one other difference. Haiku got a test result wrong (see below).

I got that test wrong myself the first time. I missed the words “without pressing anything” and had to run it again. I’m flawed!

The cheapest model was also the slowest. Haiku took about twice as many turns as Sonnet to do the same twelve tests.

In short with this simple-ish application the models delivered impressive results. They outdid me. (Claude says the evidence is that they matched me. That’s almost reassuring!)

But it isn’t like for like.

A tester doesn’t work like this. The models followed every step and checked every expected result, one at a time. They saved a screenshot for each.

A tester who knows the application reads the outline and gets on with it. They’d be quicker than half an hour. They’d also notice things no step asked about. That intuition is what a tester is there for. Difficult to quantify and measure, but kind of important.

And the run isn’t the whole cost. Not by a long way.

So is that the answer? The models can do it better than me?

Not quite. That table took a day of testing to earn, and most of the testing wasn’t of the web app.

The harness

The harness is everything around the model. It hands over a test case, drives the browser, records the result and keeps each run apart from the others.

I tested it before any run counted. I still ran into issues during the formal runs.

A run could see outside its own folder. One model went looking in its first minute. It found the names of the other runs, mine included.

Screenshots went missing. One model saved them in subfolders. The step that copied the evidence skipped subfolders and reported none at all.

A reset failed part-way. The page wasn’t back at its starting point, and it looked as if it was.

None of these showed up in a pass or fail result. Each was caught by a check that ran after every run, or by someone reading what the agent had done.

Most were fixed on the day. One needs a tighter set-up before I run this again.

The run is the small bit in the middle. Three checks before every run and five after. Every check caught something.

The prompt

Even the prompt went through six drafts.

It’s a 67 line prompt. It says what the job is, where the test cases are, and how to record a result.

In an early trial run, an agent rewrote the whole result record. That wiped the evidence lines the system kept for itself.

One added line fixed it.

Edit the result record in place. Change the result line and add your steps and notes. Leave every other line in it as it is.

After that, no agent wiped a result record again. I checked every one of them.

A prompt needs testing too.

The model

Same harness. Same prompt. Same twelve tests.

The models did not work the same way.

Sonnet was the quickest and the most even. Three runs, about seven minutes each, the same twelve results every time.

Fable looked at its own screenshots to check what it had seen. On steps that said “within a few seconds” it took two shots, one during and one after. I didn’t ask it to. Trying to be too clever? Possibly.

Opus was steady. It gave the same twelve results in all three runs and never left its folder. In one run it mistyped an ID, wrote “my typo” in its notes and tried again. Consistent.

Haiku was the cheapest, and it showed.

  • It left its own folder at the start of three of its four runs.
  • In three of them it didn’t save a screenshot for every step.
  • Once it recorded a test as failed when every one of its thirteen steps had passed.

On that last one, the application was fine. The agent’s own notes say the test passed. The recorded result says it failed.

You would only find that by reading through the test steps. Which means we’re back to reviewing what the agent does.

And we’re all aware of the discussions around reviewing agent work and PR reviews being a bottleneck.

One test, two stories. Thirteen steps marked pass and the result recorded as a fail. What happened here? We're back to reviewing!

What this doesn’t show

This is a first, crude evaluation. Here are its limits, as bullet points.

  • One web app, twelve tests, one day.
  • All four models come from one company (Anthropic).
  • I wrote the tests and I knew the application. My run is the yardstick, and I got one test wrong on my first try.
  • AI sessions helped me write the tests and check the runs. One of them runs on a model I then evaluated.
  • I was using the same machine during some runs. Nothing suggests it affected them.
  • Haiku has four runs and the others have three. Its third run broke my rule about staying in its own folder, so I ran a fourth. That broke it too.
  • I then decided both should count, because neither had opened another run’s results. That was after I’d seen what they found. Under the rule as I first wrote it, Haiku has two runs, and they matched me on twelve and eleven of twelve.

These tests were too easy to tell the stronger models apart.

Three of the four gave my results every time. Nine runs, no differences.

What’s next

A harder application. Not trickier tests (e.g. tests where some degree of interpretation is required).

More pages, longer flows, things that take time to load. The test cases stay plain and fair.

I consider this my first line in the sand. I can put the same tests in front of the next models and see what changes.

Ultimately though I want a tougher application that presents tougher challenges to the models.

The harness and the prompts are well on the way (I think). It’s the application under test that needs to get tougher.

Where the work was

Having said that, the models were the easy part.

The harness was where the effort was needed. Handing each agent a test case, keeping every run’s results apart, and comparing them afterwards.

Then testing all of that, because every part of it went wrong at least once.

Being able to set that up, and to test it, is going to matter more than which model you pick.

Our job as testers is to apply our testing skills to the systems we build to test.

I’d read that line again if I was you. Our job is changing. What we do is changing.

How we build these evaluation rigs and harnesses is where our focus should be.

How I built this one is the next post.