Skip to content

Myth, Tested: If AI Wrote It and the Tests Pass, It Works

If AI wrote the code and the tests pass, is the app done? Why AI-written tests can confirm the code's own bugs, and the plain checks an owner can ask for.

4 min read
Myth, Tested: If AI Wrote It and the Tests Pass, It Works

If you're paying for a custom app, or building one with AI help, you've probably heard some version of this: "The AI wrote it, and the tests pass." It sounds like the job is done. It may not be.

This article tests that idea in plain language. It explains what tests are, why AI-written tests can miss real mistakes, and what an owner can ask for to be confident the software does what the business needs.

The myth

A perfectly level balance scale holding two matching slightly chipped weights, ConsultNation
If the two sides agree, it looks like the job is done

The myth goes like this: AI tools can now write both the software and the automated tests that check it. If the tests are green (passing), the software works.

What tests are for

A teal disc rolling down a short chute toward a matching recess on a small tray, ConsultNation
A test checks a result against what it should be

An automated test is a small program that checks another program. It sets up a situation, runs the software, and confirms the result is what it should be. For example: "When a customer with an expired membership tries to book, the booking is refused."

Tests matter because software changes. When a developer adds a feature, the tests run again and flag anything the change broke. That's only useful if the tests describe what the software should do.

What developers are saying

In an article published November 11, 2026 on Martin Fowler's software development site, Matteo Vaccari, a developer and technical principal at the consulting firm Thoughtworks, described interviews he ran earlier in the year with 26 developers. They worked at an organization heavily invested in AI coding agents, tools that write and change code with little step-by-step direction.

He asked them whether they trusted their tests. Their answer, in his summary, was that they didn't trust them that much. One reason they gave: even if they review the tests when the AI first writes them, the AI later changes both the code and the tests as new features are added, so they're no longer confident the tests still check the right behavior.

Vaccari points to a second problem. When you ask an AI to "cover this code with tests," it often writes tests that confirm what the code currently does, including any bugs it may contain. A test like that will pass. It won't tell you whether the code is right.

Why "the tests pass" can mislead

A slightly chipped teal weight beside a glossy new copy that includes the same chip, ConsultNation
A copy can confirm the original, flaw and all

Put those two points together, and you can see the gap.

  • If the same tool writes the code and the tests, a misunderstanding in one can be copied into the other. Both agree, and both are wrong.

  • If the tool can change the tests whenever it changes the code, a test that used to catch a mistake can quietly be adjusted to stop catching it.

  • If the tests are long and technical, nobody on the business side can read them to check they make sense.

None of this means AI-built software is bad. It means "the tests pass" isn't evidence on its own.

What to ask for instead

Vaccari's proposed fix draws on an older practice called customer tests: tests written in the customer's language that describe what the software should do from the user's point of view. In owner terms, that comes down to three things.

1. Agree on plain-language examples before the build

Three distinct clean reference weights standing on a small navy tray, ConsultNation
Agree on the examples before the work starts

Write a short list of examples of how the software should behave, in your own words. For a booking app, that might be:

  • A customer with an expired membership can't book.

  • A booking made after 6 p.m. shows the next day's slots.

  • A cancelled booking frees the slot for someone else.

These are the rules your business runs on. Agree on them with your developer before the work starts.

2. Keep them where the AI can't quietly change them

An open navy case of clean reference weights on a shelf, with a small amber tab, ConsultNation
Keep the examples apart, and approve any change

The examples should be stored separately from the code, in a form a person can read, and changes to them should need a person's approval. Vaccari suggests keeping them in data files apart from the test code, so they're easier to protect from unexpected changes by AI tools. You don't need to know how that's done. Ask your developer how the examples are protected.

3. Have a person check them

A clean amber-rimmed reference weight on one pan of a scale, a work piece on the other, ConsultNation
Someone who knows the business should check them

Before launch, and after big changes, someone who knows the business should read the examples and confirm they still describe what you want. Then confirm the software passes them.

How this fits building to last

An open case of clean reference weights beside a closed navy book with a blank cover, ConsultNation
A readable record of what the software should do

Software that keeps working without constant rework needs a clear, readable record of what it's supposed to do. Plain-language examples are that record. They help a new developer, a future AI tool, or you understand the rules a year from now.

The verdict

Myth, tested: "The AI wrote it and the tests pass" isn't the same as "it works." Tests are only as good as the rules they check. Agreeing on those rules in plain language, and keeping them under a person's control, is part of how ConsultNation builds custom software meant to last.

Share

Get new articles by e-mail

A short e-mail when we publish something new. No spam; leave any time.

Have a project like this in mind?

Talk to our team — the first consultation is free.

Contact us