QA Interview Hub · Knowledge base · Quizzes · Українська

QA Fundamentals › AI in testing

What are the limits of AI-generated test cases?

AI-generated test cases have predictable limits: the model repeats the typical, does not know the product and does not prioritise by risk. It may record an invented rule as real. So the output is compared with a risk list (states, concurrency, data, integrations, security), gaps are filled and duplicates removed. The number of cases is not a measure of coverage, and AI is often stronger as a reviewer.

QA Fundamentals · AI in testing

AI produced 40 test cases for a login form, all alike. Why is the coverage still incomplete?

There are many test cases, the table looks solid, and it seems the coverage is fine. But half of the rows are variations of the same idea, and there is nothing at all about account lockout or concurrent sessions. The lesson covers why model-generated cases have predictable limits, how to spot them, and how to use AI where it is strong.

How it works and why. The model reproduces what is most common in texts about similar features. This gives the result three properties. Typicality: it returns the standard set for a "login form", and your differences have to be stated explicitly. No context: it does not know your integrations, incident history, team decisions or what you already cover with automated tests. No risk weight: all rows look equally important, so it will not set risk-based priorities without business input. On top of that comes dependence on the source requirements: vague requirements produce plausible but empty cases, and an invented rule is written down as confidently as a real one (the lesson about hallucinations covers this).

What AI gives and what QA adds

AI gives quickly

Breadth

Typical positive and negative scenarios, field variations, template boundary values. A cheap draft that shows the "standard" list.

QA adds

Depth

States, races, incident history, integrations, risk-based priorities, and a check against your own requirements.

Figure 1. An AI result covers what is common to many systems; what matters for yours is added by a human.

Example: checking AI cases against a risk list. Instead of counting cases, they are matched against the categories where serious defects hide: states, races, data, integrations, security. For a login form (an AI draft, an illustration):

Feature: login with email and password.

AI gave (8 cases, shortened):
  1. correct email and password -> signed in
  2. wrong password -> error
  3. empty email -> error
  4. invalid email format -> error
  ... four more variations of the same idea

What is missing (checked against a risk list):
  - lockout after N failed attempts, unlocking
  - two sessions of one user, signing out from one
  - email case, spaces at the edges, special characters in a password
  - the error message does not reveal whether an account exists
  - behaviour on a network failure and a double click
  - session lifetime, behaviour of the "Back" button

The method works without AI too: take a risk checklist (states and transitions, concurrency, data formats and boundaries, integrations, security, environment failures) and ask for each item: what is covered? What is missing, QA writes themselves or asks AI to word cases for the specific gaps. This way AI works a second time on a narrower task, and the result is better: "give cases for lockout after N attempts by these rules" yields more substantive rows than "more login cases".

Limits and alternatives. That is why AI is often stronger as a reviewer than as an author: ask it to find gaps in requirements and in the cases you already wrote, rather than to write the full set. It is also good at turning one format into another (a checklist into a table, a case into an automated test draft), expanding data sets and rewriting unclear steps. Exploratory testing, risk assessment and the decision about what to test first stay human, because they depend on product knowledge. The number of cases is not a coverage measure: ISTQB distinguishes coverage by requirements, conditions and states, and a set of forty similar cases covers one condition forty times. The review effort grows too: the more is generated, the more has to be read, so a smaller set is sometimes better.

Common mistakes.

  • Measuring coverage by the number of generated cases.
  • Not removing duplicates: the set bloats and maintenance gets more expensive.
  • Taking invented rules for requirements: every expected result should be checked against the source.
  • Demanding "more cases" instead of clarifying which risks are not closed.
  • Not adding a risk-based priority: if everything is "important", nothing is prioritised.

Check yourself

AI generated 30 cases for a transfer and none about a repeated click on "Send" and a timeout. How to spot this without carefully reading all 30 rows?

Answer

Match the set against a risk list: states, concurrency, data, integrations, failures. The categories with no cases show at once (a repeated submit, a timeout). Then add the gaps yourself or ask AI to generate cases for them.

A colleague says: "There are 120 cases, so the coverage is good". What do you answer?

Answer

The number is not a coverage measure. Look at which requirements, conditions and risks are covered and whether there are duplicates. 120 similar cases may cover only a few conditions while critical scenarios remain uncovered.

In an interview. Junior: AI does not know the product context and bug history, generates many obvious cases and few deep ones, can invent rules and does not prioritise by risk. So I more often use it as a reviewer: I ask it to find gaps in the requirements and in my cases. Middle/Senior: An AI result reflects the typical, not yours. I match it against a risk list (states, concurrency, data, integrations, security), add the gaps, remove duplicates and set risk-based priorities. Then I can ask AI for the narrower, specific gaps. I measure coverage by requirements and conditions, not by the number of cases.

More articles in this chapter