More Tests, Less Certainty: How to Measure AI-Generated Tests
Imagine an internal demo at a fintech company: within an hour and a half, an AI tool generates more than 250 test cases. There is real excitement in the room, and someone is already calculating how many workdays were saved. A few days later the review arrives: 30 of the tests check a completely different field from the one intended, and 60 turn out to be duplicates. The team did not give up the tool, but it lost an entire sprint, because it had no quantitative way of knowing how many of the 250 tests were actually usable. This case was described this week in an analysis article on DevOps.com, and the pattern it describes is familiar to us from the field. Most organizations adopting AI for testing today measure what is easy to measure: how many tests were generated and how many hours were saved. These are metrics that look great in a management presentation, and say very little about the question that really matters: does your Regression suite catch more bugs, or just get longer. In this article we break down the common failure modes of AI-generated tests, examine what the public data from Meta, Thoughtworks, and an academic study that examined tens of thousands of tests written by Coding agents teach us, and propose a practical KPI framework for measuring reliability, with an emphasis on regulated organizations such as banks and insurance companies.
The Volume Trap: Why Counting Tests Is a Misleading Metric
Imagine a factory that measures its success by the number of screws coming off the line per hour, without checking how many of them fit the hole. In the first month the dashboard is green; in the second month the returns from customers begin. This is exactly what an AI adoption strategy based on Test count looks like: it rewards production, not benefit.
Let's go back for a moment to the fintech case. 30 tests that check the wrong field and 60 duplicate tests make up to 90 problematic tests out of 250, that is, more than a third of the output, and that is before anyone checked whether the remaining tests cover the important edge cases. The DevOps.com article lists exactly these four failures: AI can generate tests for wrong business rules, generate too many scenarios for a simple requirement, generate duplicate tests that add no real coverage, or miss critical edge cases entirely. None of these failures shows up in the "number of tests generated" metric. Some of them even improve it.
The "time saved" metric is also more misleading than it seems. In the controlled Thoughtworks study, discussed at length below, an average saving of 80.07% in test creation time was measured. That figure refers to the draft stage. In the same study, 27.22% of the generated tests were ambiguous, and the researchers explicitly note that they did not measure the effect on productivity over time. In other words, the stopwatch stops at the moment the model finishes writing, not at the moment the test enters the Pipeline when it is correct, clear, and not duplicated.
The third metric that tends to mislead is Code coverage. A study published in June 2026 that examined tests written by Coding agents recalls an old finding in the research literature: coverage is only weakly correlated with the ability to detect faults, and in mature test suites gaps of up to 51% were found between code that is run by tests and code whose result is actually checked. A test that runs a function and does not check what it returns raises coverage, and just as much raises the sense of security, without protecting anything. When AI generates tests at a rate of hundreds per hour, this gap grows faster than a human team is able to identify.
Four Failure Modes of an AI-Generated Test
Before deciding what to measure, it is worth defining exactly what goes wrong. In our experience, and in line with the sources we review here, most problems fall into one of four categories, and each has its own metric.
A Test That Checks the Wrong Thing
This is the most dangerous failure, because it looks completely fine. The test runs, passes, is well worded, and checks an adjacent field, a similar business rule, or a scenario that was not defined in the requirement. In the fintech case these were 30 tests. Thoughtworks reported that the models they examined struggled with interpreting complex business logic, and that the quality of the output depended heavily on the quality and specificity of the input. In a bank, the difference between "available balance" and "actual balance" is one line in a User story and a whole world in system behavior. A model that does not know the context will choose the statistically plausible interpretation, not necessarily the correct one.
Duplication Disguised as Coverage
Duplicate tests look like additional coverage, and in practice they are an additional cost: run time in the Pipeline, double maintenance with every interface change, and more surface exposed to Flaky tests. Thoughtworks measured an average duplication rate of only 4.22%, but the range was between 0 and 20 percent, and in the fintech case the ratio was 60 out of 250, almost a quarter. The gap between the numbers teaches something important: the duplication rate is not a property of "the tool", it is a result of context, of the prompt, and of the structure of the requirement. That is why you cannot adopt a number from outside, you have to measure it in your own organization.
An Ambiguous Test That Cannot Be Run Without Interpretation
In the Thoughtworks study this was the prominent finding: on average 27.22% of the tests were classified as ambiguous, with unclear steps, and in some stories the rate reached 80%. An ambiguous manual test shifts the work to the tester who runs it, who has to guess what was meant. An ambiguous test that becomes an automation script is even worse, because the guess is fixed in code. The researchers also found that tests generated from a basic prompt tended to be general and abstract, with few details and examples.
A Test That Locks In the Bug: The Oracle Problem
This is the subtlest failure, and it mainly concerns code-level tests. When a model receives code and is asked to write tests for it, it tends to write Assertions that reflect what the code actually does, not what it is supposed to do. A controlled study that examined exactly this question found that LLM-based test generation approaches mainly capture the existing behavior of the program, and therefore struggle to detect bugs. If the code has a bug in an interest calculation, the generated test may "lock in" the wrong result and turn it into the expected value.
The extreme version of the problem is a test with no Oracle at all. In the "All Smoke, No Alarm" study, 86,156 changes to test files from 33,596 Pull requests written by five Coding agents, in 2,807 GitHub repositories, were examined. 80.2% of the changes contained weak Oracle signals or no explicit Assertion at all, meaning they run code without verifying that the result is correct. Thoughtworks call the phenomenon "perpetually green" tests, ones that pass regardless of changes in the logic because of missing Assertions or Mocks that are disconnected from the real code.
What the Field Data Teaches
To build a serious measurement framework you need to rely on those who have already measured. Three public sources provide an especially rich picture, and each of them illuminates a different angle of the problem.
Thoughtworks: Systematic Measurement of Manual Tests from User Stories
The Thoughtworks experiment, published in July 2025, compared tests written by three QA engineers with three to five years of experience to tests generated using GitHub Copilot and ChatGPT, based on nine User stories at different levels of complexity. What makes it relevant to us is less the results and more the methodology: eight defined metrics, each with a formula. Correctness was measured as the ratio of correct tests to the manual baseline, Acceptance criteria coverage was measured using a Requirement traceability matrix, and the rate of duplicates, incorrect tests, and ambiguity were measured as a percentage of all the tests the model generated.
The results after prompt improvement are interesting precisely because of their spread: an average Correctness of 87.06%, Acceptance criteria coverage of 98.67%, structural consistency of 96.11%, and an incorrect test rate of 6.44% on average with a range of up to 20%. Prompt improvement alone yielded an average improvement of 67.78% in the main metrics. The researchers themselves point out the limitations: a sample of only nine stories, specific tools and versions, and subjective elements in the evaluation. Their conclusion is that the tools are effective as an assistive technology and not as a replacement, and that teams need a structured review step: validation against Acceptance criteria, flagging unclear logic, and checking edge-case coverage, before such tests enter day-to-day work.
Meta: A Filtering Funnel as a Measurement System
Meta's TestGen-LLM, described in a paper presented at the FSE 2024 conference, is probably the best-documented example of bringing LLM-generated tests into a production environment. Meta's approach does not trust the model: every candidate test passes through a series of filters, and it is discarded if it does not build, does not pass stably, or does not increase coverage. In the evaluation on Instagram's Reels and Stories, in 75% of the test classes at least one test was generated that builds, in 57% at least one test that also passed stably, and in only 25% at least one test that also increased coverage. When the tool was run on existing test classes at Instagram and Facebook, it improved 10% of the classes, and 73% of the improvements it suggested were accepted by developers and went into production.
The lesson for other organizations is not the numbers themselves, but the structure. Meta's funnel is itself a measurement system: at every stage you know how many candidates dropped out and why. Between "built" and "adds value" there is a threefold gap. An organization that measures only the top of the funnel will see 75% success, one that measures the bottom will see 25%, and both are right about a different question.
Meta ACH: When the Question Is What the Test Catches
Meta's second tool, ACH (Automated Compliance Hardening), reverses the order of operations. Instead of generating tests and then asking what they are worth, engineers describe in free text a type of fault that worries them, an LLM generates Mutants, that is, deliberate faults injected into the code, relevant to that concern, and then tests are generated that are guaranteed to catch those Mutants. According to Meta's engineering blog, across thousands of Mutants and hundreds of tests, the company's privacy engineers accepted 73% of the tests, and 36% of them were judged relevant to privacy.
This figure deserves a pause. Even in a sophisticated system that generates tests around a predefined fault, the acceptance rate and the relevance rate are two very different numbers. A test can be valid, readable, and accepted in review, and still not contribute to the risk for which you started the process. That is why the Acceptance rate is a necessary condition, but far from sufficient.
The "All Smoke, No Alarm" Study: What Happens in Open Source
The June 2026 study adds a figure every QA manager should know: the strength of the Oracle varies by the type of task assigned to the agent. When the tests were written as part of feature work, only 18.2% of the changes contained a strong Oracle, compared to 25.6% in bug fixes and 24.9% in tasks defined as testing tasks. The researchers conclude that more meaningful Oracles are obtained when verification is defined as an explicit goal and not packed inside a feature PR, and recommend CI checks that flag new test files without Assertion patterns. They too mark the limits of the method: classifying a test as strong confirms that an equality check exists, not that it checks the right property.
From a Volume KPI to a Trust KPI: A Practical Measurement Framework
How do you replace the question "how many tests did we generate?" with "how many of them can go into the Pipeline without a second thought?" The DevOps.com article proposes for this an AI Trust Score made up of four dimensions: test acceptance quality, confidence in coverage, Rework effort, and detection of significant faults. The author stresses that the score does not eliminate the need for human review, but makes it possible to track over time whether the AI's output is becoming more reliable or is simply producing more tests to review.
We suggest expanding the four dimensions into eight operational metrics, each relying on a methodology already tested in one of the sources we reviewed. This framework is our proposal and not an industry standard, and it should be adapted to each organization.
Metric | What it measures | How it is measured |
|---|---|---|
First-pass acceptance rate | The share of tests approved in review without changes | Tests approved as they are divided by all tests reviewed |
Misdirected test rate | Tests that check the wrong field, rule, or scenario | Flagging in review against the requirement |
Duplication rate | Tests that add no unique coverage | Duplicate tests divided by all tests generated |
Ambiguity rate | Tests that require interpretation in order to run | Flagging in review of unclear steps or results |
Oracle strength | The share of tests with a meaningful Assertion | Static analysis of Assertion patterns in CI |
Mutation score delta | How many additional Mutants are killed thanks to the new tests | Running Mutation testing before and after adding the tests |
Review cost per accepted test | Human time invested for each test that gets in | Review and Rework time divided by the number of tests approved |
Defect yield | Real bugs caught thanks to AI-generated tests | Tagging the test source on every bug opened |
Three principles accompany the table. The first: do not collapse all the metrics into a single score without also showing the components. A weighted score is useful for management, but a team that sees only a score of 72 does not know whether the problem is duplicates or weak Oracles. The second: the trend matters more than the absolute value. The score is meant to answer whether the process is improving from sprint to sprint, after prompt improvement, a model change, or an improvement in requirement quality. The third: measure separately by test type. Thoughtworks examined manual tests generated from User stories, Meta examined Unit tests, and the study on Coding agents examined tests inside PRs. These are different worlds, and a single average that mixes them hides more than it reveals.
Architectural note: None of these metrics can be measured if you do not know which tests were generated by AI. That is why the first step is technical: every test generated with AI assistance gets fixed Metadata, for example a tag in the test management tool or an Annotation in the code, that includes the tool, the model version, the prompt version, and who approved it. Without this layer, bug analysis, comparison between models, and tracking Defect yield become archaeology. For regulated organizations this has an additional advantage: it creates orderly documentation of who approved each test and on what basis.
Mutation testing: The Objective Line of Defense
How do you know a smoke detector works? You don't count how many detectors you installed, you light a controlled fire and check whether it beeps. Mutation testing does exactly this to the test suite: it injects small, deliberate changes into the code, such as flipping a condition or changing an operator, and checks whether at least one test fails. A Mutant that survived marks behavior that no test actually verifies.
Thoughtworks placed the technique in the Trial ring of the April 2026 Technology Radar, and defined it as the most honest signal for assessing a test suite's fault-detection ability. Their reasoning relates directly to our topic: in an era of AI-assisted development, high coverage percentages can hide logically hollow tests, and Mutation testing serves as a reinforcing layer that catches the perpetually green tests. The Radar also mentions specific tools such as cargo-mutants for Rust, which Thoughtworks teams use to go beyond simple coverage measurement.
In practice, Mutation testing across the whole Codebase is a heavy process in terms of run time and compute resources, so we recommend two adjustments. The first is a targeted run: only on the modules where AI-generated tests were added, and only on the code that changed. The second is risk-based prioritization: modules for financial calculations, permissions, and personal data get full Mutation testing, and the rest of the code is sampled. This gets you the Mutation score delta metric at a reasonable cost.
Meta's ACH shows where the idea can be taken. Instead of generic Mutation operators, an LLM generates Mutants aimed at a specific type of fault, and an additional LLM-based agent tries to identify equivalent Mutants, that is, changes that do not alter behavior and therefore cannot be caught. According to Meta's paper, the workflow requires engineers to review only the tests, not the Mutants themselves. This is already a system operating in production at Meta, but for most organizations it is still a goal and not a starting point. The reasonable starting point is an existing Mutation testing tool, run on the tests the AI generated, with its results entering the trust dashboard.
The limitations should also be remembered. Mutation testing is especially suited to Unit tests and service-level tests. In End-to-end tests and manual tests generated from User stories, the more relevant metric is Traceability against Acceptance criteria and controlled fault injection in the test environment, for example in API responses or test data, to verify that the test actually fails when the business behavior breaks.
The Cost of Human Review: The Metric Missing from the Dashboard
How much does a test generated "for free" cost? If you count only the creation time, almost nothing. If you count its whole lifecycle, the picture is different. The review, the fix, the discussion about interpreting the requirement, and a duplicate that will require double maintenance with every future change are all real costs, and none of them appears on the slide that presents "80% time savings."
We recommend calculating net savings and not gross savings: the time saved in writing, minus the review time, minus the Rework time, minus the expected maintenance cost of duplicate or ambiguous tests that slipped past review. In the fintech case, the gross saving was an hour and a half instead of days of writing, and the net saving was negative, a whole sprint lost. This figure is not meant to scare, but to illustrate that without measuring review cost, the decision whether to expand use of the tool is made on the basis of half of the equation.
Large-scale review also has a qualitative price, not only a quantitative one. In our experience, a reviewer who receives 250 tests at once does not review the 200th test with the same care as the fifth, especially when the tests are well worded and look convincing. This is exactly the point where a test that checks the wrong field slips under the radar. That is why it is worth limiting the size of the batch sent for review, building a fixed Checklist based on Thoughtworks' recommendations (validation against Acceptance criteria, flagging unclear logic, and checking edge cases), and applying automatic filtering before the tests reach a human eye: removing duplicates, checking the Oracle, and checking the link to the requirement.
Another point worth factoring in is input quality. Thoughtworks found a heavy dependence on the quality and specificity of the User story, and an average improvement of 67.78% from prompt improvement alone. The organizational implication is that part of the review cost is actually the cost of insufficiently precise requirements. When you measure Ambiguity rate per story, you can identify which teams or product areas produce requirements that the AI cannot translate into reliable tests, and address the problem at its source.
Banks and Insurance Companies: Why the Bar Is Higher Here
In a financial organization, a test that checks the wrong field is not just a waste of time. It can create a false sense of security about a process that has direct financial and regulatory implications: premium calculation, indexation, fees, balances, or eligibility. The case described by DevOps.com took place in exactly such an environment, and that context explains why in these organizations in particular, measuring trust must come before expanding use.
Three characteristics raise the bar. The first is the complexity of business rules. If models struggle with complex business logic even in a controlled experiment on nine stories, it is easy to imagine what happens in an insurance core system with decades of exceptions, legacy products, and transition rules. The second is the requirement for traceability. Meta's research on ACH notes as an advantage the fact that the decision to accept machine-generated code has an Audit trail, because the review is documented and attributed to an engineer. In a regulated organization, such an Audit trail is part of how you prove that the tests actually cover the requirements. The third is data sensitivity: tests generated from production data, or ones where the model is asked to generate test data, must meet the same privacy rules as any other process.
The practical conclusion is division into risk tiers. In critical processes, such as financial calculations, permissions, and reporting, every AI-generated test goes through full human review against the requirement, and the Misdirected test rate must be zero before the tests enter the Regression suite. In medium-risk processes, you can combine automatic filtering and sample review. In low-risk processes, such as display checks, automatic filtering and tracking Defect yield over time may be enough. This division lets you enjoy the speed of AI where risk is low, without giving up control where a mistake is costly.
What Exists Today and What Is Still a Vision
In the discussion of AI in testing it is easy to confuse what already works in production with what is presented at conferences. It is worth separating them explicitly.
What exists and is documented today:
Generating draft test cases from User stories, with significant savings in writing time and with a proven need for human review, as documented by Thoughtworks.
Generating Unit tests with an LLM within an automatic filtering funnel and human review, at production scale, as Meta documented in TestGen-LLM.
Mutant-guided test generation around specific fault types, again at Meta, with a human in the approval loop.
Mature Mutation testing tools that teams use to examine AI-generated tests, as reflected in the Thoughtworks Technology Radar.
Coding agents writing tests at enormous scale in open source: the June 2026 study mentions more than 932,000 PRs written by agents in more than 116,000 repositories.
What is not yet mature:
An industry standard for an AI Trust Score. The proposal in DevOps.com is a good conceptual framework, but there is not yet an agreed definition of components, weights, or thresholds.
Generating reliable Oracles for expected behavior without human input. The academic research shows that models tend to capture existing behavior, and this is a fundamental limitation and not a bug that will be fixed in the next version.
Fully autonomous test generation, without review. Even in an advanced production environment like Meta's, tests enter only after an engineer's approval.
This distinction matters for budget planning and for managing expectations with management. An organization that plans to significantly reduce testing effort based on capabilities that are still a vision will discover the gap in the first quarter.
Action Plan: How to Start Measuring Trust
The move from volume metrics to trust metrics does not require a huge project. It requires the right order of operations. This is the plan we recommend for organizations that already use AI to generate tests, or plan to start.
Step 1: Infrastructure and baseline (the first month)
Tag every AI-assisted test with Metadata for the tool, model, prompt version, and approver.
Choose two or three product areas as a pilot, preferably one critical and one low-risk.
Measure a manual baseline: how long it takes today to write and review tests in these areas, so there is something to compare against.
Step 2: Automatic quality gates (the second and third months)
Automatic duplicate detection before human review.
An Oracle check in CI that flags new test files without meaningful Assertions, in line with the recommendation of the study on Coding agents.
A requirement to link every test to a specific Acceptance criterion, so that the Misdirected test rate and requirement coverage can be measured.
A fixed review Checklist and measurement of review time for each batch.
Step 3: Measuring effectiveness (from the fourth month)
Running targeted Mutation testing on critical modules where AI-generated tests were added.
A dashboard that shows the eight metrics separately and their trend over sprints, alongside a weighted score for management.
Tracking Defect yield: how many real bugs were caught by AI-generated tests, and how many bugs leaked into production in the areas they are supposed to cover.
Step 4: Improvement loop and scope decisions
Feeding the findings back into the prompts and the quality of requirements, in areas with a high Ambiguity rate.
Expanding use to additional areas only when the trust trend rises, not when the number of tests rises.
A quarterly review of thresholds and weights, especially after a model or tool change.
Summary: What You Measure When You Measure Success
AI is already able to write tests faster than any human team, and there is no reason to give up that advantage. But the speed of creation is only the cheap side of the equation. The question that determines whether the investment pays off is how many of the tests are correct, not duplicated, clear, check the expected behavior, and catch real bugs, and how much human time is needed to verify all of that. The data from Meta, from Thoughtworks, and from the study on Coding agents point in the same direction: between "generated" and "adds value" there is a large gap, and it closes only through systematic measurement and structured review.
An organization that measures trust and not volume can make informed decisions: where to expand use, where to invest in better requirements, and where to leave the writing in human hands. At VeriSoft we work with testing teams in banks, insurance companies, and security and high-tech organizations, and build this measurement layer together with them within existing workflows, so that AI adoption relies on data and not on demonstrations.





Comments