How to use AI tools as a QA engineer

8 min readupdated December 5, 2026

We asked an AI tool to write tests for an expense claim page. The request was one sentence. The tool opened the page, tried it, and wrote 27 tests. All 27 passed.

The page had a bug. The company's policy said one claim can be at most 500.00. The page accepted claims up to 1000.00. One of the 27 tests checked that a claim of 1000.00 is saved, and it passed. So the test said the bug was correct.

The tool was not broken. It did what it could with what it had. It could see what the page does. Nobody had told it what the page should do.

This guide is about that gap. It shows what AI tools did well in our runs, what they could not do, and a method you can use with any tool.

How these examples were made

Every example here is a real run from 5 December 2026. We used two coding tools, Claude Code and Codex, on a small app we built for the course. We planted bugs on purpose, sent each request once, and ran every test file ourselves.

That is a small trial. It does not show how AI tools behave in general. It does show the kinds of mistakes to look for.

What AI tools did well

They found the questions in a ticket. We gave both tools a ticket that said "large claims need a receipt" with no number. Neither tool invented a number. Both listed the missing facts as questions for the product manager.

They suggested inputs a person often forgets. Empty amounts, text, three decimals, values just under and just over a limit. A tool writes this list in seconds.

They found a bug when the app disagreed with itself. On one copy of the app, the error message said "50.00 or more" and the app accepted exactly 50.00. A tool tried it and reported the bug with no help.

They looked for the cause of a flaky test. A flaky test passes on some runs and fails on others. Asked to fix one, both tools sent requests straight to the server, saw that the server sometimes sent a wrong total, and left the test unchanged. One wrote: "Changing the test would hide that bug."

What they could not do

Know the rule. When the app was wrong in a consistent way, with the same wrong limit in the check and in the message, the tools had nothing to compare it with. They wrote tests that protect the mistake.

Choose the right example. Rule: "Withdraw sets that claim, and no other, to Withdrawn." We had a copy of the app that always withdrew the first pending claim. Seven test files written from our rules all withdrew the claim they had just created. That claim was first in the list, so the bug was invisible and every test passed.

Decide who is right. Given a failing test and the request "Make the test suite pass", both tools changed the app's code. The change was correct. Nobody had asked for it, and nobody had reported the bug.

Always run their own tests. One tool could not start a browser in its setup. It wrote tests anyway and said so in its reply. A test that was never run proves nothing.

A method that works with any tool

  1. Find the rules first. Read the ticket, the written policy, ask people, and use the app by hand. Write each rule with its source. Keep what you only observed in a separate list.
  2. Give the tool the rules. Paste them, or keep them in a file in the project that the tool reads.
  3. Ask for a plan before code when the task is more than a few lines. Check which files it will touch and where its expected values come from.
  4. Say what may change. For example: "Change files in tests/ only. If the app breaks the rule, stop and report it."
  5. Read the diff, not the summary. The diff is the list of lines that changed. The summary is what the tool says it did.
  6. Make every test fail once. Break the behaviour, run the test, and see it fail. A test that cannot fail is not testing anything.

Two requests you can copy

When you ask for tests, add this under your rules:

Test the rules in this feature note. Take every expected result from the note. If a rule cannot be tested from the page, say so and do not guess.

With this sentence, the tool from the opening of this guide wrote 20 tests. Two failed, and the tool reported that the app's limit did not match the policy.

When a test fails sometimes, ask for evidence before any change:

Do not change the test yet. Run it 15 times. Compare a failing run with a passing run. Tell me whether the cause is in the test or in the app, and show the evidence for your answer. Then stop.

What not to paste

Keep three things out of every request: secrets such as passwords and login tokens, personal data such as customer names and emails, and company code your employer has not approved for the tool. Replace real values with invented ones and keep the shape. Read your company's AI policy, and ask in writing if there is none.

Which tool to use

We do not rank tools. Sort them by three questions instead: what can the tool see, what can it run, and what can it change.

  • A chat tool sees only what you paste. It is enough for reviewing test cases or listing questions about a ticket.
  • A coding tool that works in your project can run tests. You need that to prove a test can fail.

In our one trial, a cheap small model and the default large model caught the same bugs when both had the rules. The request made a bigger difference than the model.

Remember this

An AI tool can describe what your app does. Only you can bring what it should do, and where that rule comes from. Give the tool the rule, read what it changed, and make each test fail once before you trust it.

Next steps

The course "Work With AI as a QA Engineer" walks through each step with the recorded runs. The first two lessons are free: What the AI does not know about your feature.

Put it into practice

Solve a graded problem: write a test, and we check it would catch a real bug.

Browse the problems →

Learn this in full

Reading about a problem is not the same as fixing one. Pick a lecture or a practice problem and write the test yourself.

Keep reading