Assurance Myths, Issue One: High Code Coverage Means the Tests Are Good
Assurance Myths, issue one: a 2014 study of 31,000 test suites, read against its method, on what a code coverage figure shows about a test suite.

In short
Assurance Myths takes one widely held belief per issue and checks it against one source. The belief in this first issue is that a high code coverage figure shows a test suite would catch faults. The source is a 2014 study by Laura Inozemtseva and Reid Holmes, who built 31,000 test suites from five large Java programs and compared the coverage of each suite with the share of seeded faults it caught. Once the number of tests was held constant, the correlation between coverage and fault detection was in general low to moderate, and it varied by program. A coverage report shows which code the tests never ran. Whether the tests would catch a fault in the code they did run has to be shown by other evidence, such as a mutation score.
The myth
A coverage report states what share of a program ran while its tests ran. Teams set a threshold on that share, and a change that clears the threshold reads as tested. An AI coding agent can write the tests in the same change as the code, and the coverage figure is computed the same way whoever wrote them. The study opens with the belief it set out to examine: "The coverage of a test suite is often used as a proxy for its ability to detect faults."
The source, read against its method
Inozemtseva and Holmes presented "Coverage Is Not Strongly Correlated with Test Suite Effectiveness" at the International Conference on Software Engineering in 2014 (paper, from the co-author's university page). They took five open source Java programs, Apache POI, Closure Compiler, HSQLDB, JFreeChart and Joda Time, which range from 80,462 to 724,089 source lines of Java code. From the tests the developers of each program had written, they drew random subsets of fixed size: "We made 1,000 suites of each of the following sizes: 3 methods, 10 methods, 30 methods, 100 methods, and so on", which gave "a total of 31,000 test suites across the five subject systems".
For every suite, a coverage tool recorded statement, decision and modified condition coverage, and a mutation testing tool then scored how well the suite found faults. In the paper's definition, "A mutant is a new version of a program that is created by making a small syntactic change to the original program", such as a negated branch condition, and a suite was scored two ways. The non-normalized measure is the share of all detectable faulty versions on which at least one of its tests failed. The normalized measure counts the same share only among the faulty versions whose changed line the suite had run.
With suite size left out of the comparison, coverage and effectiveness rose together in four of the five programs on both measures. HSQLDB was the exception, with a low negative correlation of minus 0.35 on the normalized measure. The authors' answer is that their results suggest "for many large Java programs, there is a moderate to high correlation between the effectiveness and the coverage of a test suite when the influence of suite size is ignored". They offer a reading of why: "in many cases, the apparent relationship is largely due to the fact that high coverage suites contain more test cases". Comparing suites with the same number of tests controls for suite size, and the paper says what happened: "Controlling for suite size always lowered the correlation between coverage and effectiveness."
How far it fell depended first on the measure. In the paper's words, "the magnitude of the change depended on the effectiveness measurement used": in general the correlations that remained were low on the normalized measure and moderate on the non-normalized one. On the verbal scale the authors use for these rank correlations, low is below 0.4 and moderate is 0.4 to 0.7. The size of the drop also depended on the program. For Joda Time, the correlation "ranged from 0.80 to 0.85 when suite size was ignored, but dropped to essentially zero when suite size was controlled for". Apache POI sat "at the other extreme": on the non-normalized measure its correlation was 0.94 with size ignored and fell to "a range of 0.46 to 0.85" with size controlled, and the authors grant that "a correlation in this range can provide useful information about the quality of a test suite". Their summary across the five programs is that "it is therefore not generally safe to assume that effectiveness is strongly correlated with coverage".

The three coverage types behaved alike in the plots, "suggesting that the different types of coverage are measuring the same thing" in the authors' words, and the numbers agreed: across all suites, the rank correlation between any two of the three types was 0.91 or 0.92. Modified condition coverage, the strictest of the three, is close to the MC/DC criterion used in avionics, and the paper treats the two as separate measures.
The paper lists its own limits. Effectiveness was measured on seeded faults, and the authors name the check that remained: "Our next step is to confirm our findings using real faults". Any mutant that a program's full test suite missed was assumed to be equivalent, meaning undetectable by any test, which removed "up to 35% of the generated mutants" from the count. The coverage of the generated suites "rarely reached very high values", so a relationship that appears only near full coverage could have gone unseen. The subjects were five open source Java programs, and "our results may not generalize to closed source systems". The authors also write: "Since we have studied correlations, we cannot make any claims about the direction of causality." It is also one study in a field where, by the abstract's account, earlier ones "have failed to reach a consensus about the nature and strength of the relationship". One limit the paper could not list is ours to add: every test in the study was written by a program's developers in or before 2014, and none by a coding agent.
What a coverage figure does tell a reviewer
The authors keep a use for coverage. In their words, "While coverage measures are useful for identifying under-tested parts of a program, and low coverage may indicate that a test suite is inadequate, high coverage does not indicate that a test suite is effective." Their advice on thresholds follows from it: "using a fixed coverage value as a quality target is unlikely to produce an effective test suite".
In our reading, this is where the engineering bottleneck sits once agents write more of the code. The change and its tests arrive together, in minutes, and a person still has to decide whether those tests are grounds to accept the change. A coverage percentage answers a narrower question than that. Four further questions cover the rest, and each has an answer that can be kept in the record of the change. The questions are the same for tests written by hand.
- Which code did the tests never run? The coverage report answers this, and each gap is a finding to explain. Our article on design assurance levels describes how structural coverage is used in airborne software.
- Would a test fail if the code were wrong? Evidence can be a mutation score on the changed code, or a test shown failing before the fix and passing after it. The authors call the choice of a better metric "an open problem" and say they "currently feel that mutation score may be a good substitute for coverage in this context".
- What does each test check, and against which requirement? Someone has to read the assertions. As the paper notes of statement coverage, "executing a line does not necessarily reveal an error in that line".
- Who wrote the tests, who ran them, and who approved the change? Tests written by whoever wrote the code can share that author's assumptions. Our article on independent verification and validation sets out how far apart the two can stand.
In software whose failure has consequences, those answers are kept with the change as part of its assurance case. Our article on agentic engineering explains why acceptance is now the scarce step.
Where Kealu Vector fits
The Agentic Engineering Assurance Layer is the proposed category for the layer that governs how agentic engineering work is performed and evidenced, so that humans can trust and accept the resulting work. Our white paper AI Has Moved the Bottleneck sets out the problem it answers, and the questions raised here hold whatever tools a team uses to answer them. Kealu Vector, currently designated Vector Assurance Assist, is our early-access implementation of that category.
FAQ
Does high code coverage mean the code is well tested?
High code coverage means a large share of the code ran during the tests. Whether the tests would notice a fault in that code is left open. A 2014 study by Inozemtseva and Holmes compared 31,000 test suites drawn from five large Java programs and found, in general, a low to moderate correlation between coverage and fault detection once the number of tests was held constant. The authors conclude that "high levels of coverage do not indicate that a test suite is effective". The study measured seeded faults in open source Java programs, and its suites rarely reached very high coverage.
What is the difference between code coverage and mutation testing?
Code coverage records which statements or branches of a program ran while the tests ran. Mutation testing makes many copies of the program, each with a small change, and records how many of the faulty copies make at least one test fail. Coverage describes what the tests executed, and a mutation score describes what they would detect. Inozemtseva and Holmes used mutation testing as their measure of test suite effectiveness, and wrote that they "currently feel that mutation score may be a good substitute for coverage in this context", while calling the choice of metric an open problem.
Is code coverage still worth measuring?
Code coverage is worth measuring for what it finds: code that no test runs. The authors of the 2014 study write that coverage measures are "useful for identifying under-tested parts of a program" and that "low coverage may indicate that a test suite is inadequate". They advise against a fixed target. In their words, "using a fixed coverage value as a quality target is unlikely to produce an effective test suite". A gap in the report is a finding to explain, and a high percentage still leaves the tests themselves to be reviewed.
Does a coverage figure mean the same thing when an AI coding agent wrote the tests?
A coverage figure is computed the same way whoever wrote the tests, so it carries the same limit. The 2014 study predates coding agents, and every test in it was written by a program's developers. One of its remarks does concern automated test writing: "test generation techniques often attempt to maximize the coverage of the resulting suite; our results suggest that this may not be the best approach". For an agent-assisted change, a reviewer can ask for evidence that the tests fail when the code is wrong, and for a named person who approved the change.
On Google
Add Kealu as a preferred source: our articles get highlighted in Top Stories, AI Mode and AI Overviews.
Talk to our team.
Questions about this article, or about using Kealu Vector in your organization? Send us a message.
Talk to our team.

