Series 01 — The Engineering Governance Gap | Episode 02
When Passing Tests Is Not Enough
What Coverage, Assertions, and Test Assumptions Can—and Cannot—Establish.
In Episode 1: From Checks to Decisions, we examined what a green pipeline actually tells us. But that question does not end with CI status. Even when the tests in a pipeline pass, we still need to understand what those tests evaluated, how they determined that the observed behavior was correct, and which assumptions were necessary for the result to remain meaningful.
A passing test suite provides evidence, but that evidence has boundaries. It tells us that, for the cases executed and under the conditions represented by those tests, the observed behavior matched the expectations encoded in them. It does not independently establish that those cases were sufficient, that the expectations were correct, or that the assumptions behind them still reflect the system.
Coverage tells us what was exercised, not everything that was verified
Code coverage is one of the most familiar ways to evaluate a test suite because it shows which executable statements or branches were exercised. These measurements are useful: they can reveal untested areas and help teams identify where additional test cases may be needed. However, their meaning is narrower than it may first appear. Executing a statement is not the same as verifying that its behavior is correct.
The distinction becomes clearer when we consider what 100% coverage actually means. According to the ISTQB Foundation Level syllabus, 100% statement coverage means that every executable statement has been exercised at least once, while 100% branch coverage means that every branch has been exercised. Neither criterion guarantees the detection of every defect. Statement coverage, for example, may miss a data-dependent failure if the relevant input condition was never tested; branch coverage also cannot establish that every possible combination of relevant inputs has been evaluated.
Consider a function that calculates an average by dividing a total by the number of records. A test may execute the division using a positive number of records and report no failure, satisfying statement coverage for that line. Yet the test may never examine what happens when the number of records is zero or when the input contains unexpected values. The code has been executed, but the relevant boundary conditions have not necessarily been verified.
Coverage should therefore be interpreted as a measurement of execution against a defined coverage criterion, not as a score of software correctness. It provides information about where testing has reached, but additional evidence is needed to determine whether the tested behavior and input conditions are appropriate for the risks being considered.
Reference: ISTQB — Certified Tester Foundation Level Syllabus v4.0.1, Sections 4.3.1–4.3.3.
A test can pass while checking the wrong thing
Even when the relevant code is executed, another question remains: how does the test know whether the observed result is correct? This is the test oracle problem. A test oracle provides the expected behavior against which the actual behavior is evaluated, and that expectation may come from a requirement, specification, contract, model or manually defined assertion. The difficulty is that an expectation can be incomplete or incorrect, even when the test executes exactly as designed.
Consider an API endpoint that returns information associated with a user account. A test sends a request and verifies that the endpoint returns HTTP 200. The assertion passes, but what if the response contains information belonging to another tenant? The test has confirmed the response status without evaluating the authorization property that matters in this scenario. Its result is valid within the narrow scope of its assertion, but that result cannot establish that the endpoint preserves tenant isolation.
This is not simply a problem of insufficient execution coverage. It concerns the relationship between the behavior being evaluated and the expectation used to judge it. Barr et al., in The Oracle Problem in Software Testing: A Survey, examine precisely this challenge: distinguishing desired, correct behavior from potentially incorrect observed behavior. Their research discusses different approaches to constructing test oracles, including specifications, models, contracts and metamorphic testing, while recognizing that human judgment often remains necessary when formal expectations are incomplete.
The practical implication is that a passing assertion should always be interpreted in relation to the property it checks. Before relying on a result, we need to understand not only whether the assertion passed, but also why its expected outcome is an appropriate representation of the behavior the system is supposed to provide.
A larger test suite is not necessarily a stronger test suite
Test suites naturally grow as software evolves. New features introduce scenarios, defect fixes produce regression tests, and integrations bring additional conditions that need to be evaluated. This growth is generally useful, but the number of tests alone does not tell us whether the suite has become more effective at detecting defects. A suite can become larger while leaving important behaviors insufficiently checked, particularly when new tests exercise code without asserting the outcomes that matter.
Mutation testing offers one way to investigate this limitation. It introduces deliberate changes to the implementation—such as reversing a conditional or modifying an operator—and checks whether the existing tests detect those changes. When a test suite continues to pass after a meaningful mutation, the result may reveal an area where the expected behavior is not adequately asserted. However, surviving mutants require interpretation: some represent equivalent behavior or changes that would not justify additional tests. Google's experience with mutation testing illustrates why filtering unproductive mutants is important; reporting every surviving mutation can generate noise rather than improve test quality.
Research into oracle gaps provides another perspective. A paper by Maton, Kapfhammer and McMinn, published online in January 2026, compared three approaches for identifying code that executes during testing but is not adequately checked by test oracles. Across 30 Java classes from six open-source projects, the researchers found that data-loading statements, iteration statements and output updates were prominent among the identified gaps. The study is bounded by its sample and methods, but it illustrates an important distinction: execution coverage and meaningful behavioral checking are separate dimensions of test effectiveness.
The objective, therefore, is not to maximize the number of tests or to pursue mutation scores without context. It is to understand whether the suite can detect meaningful deviations in the behavior it is intended to protect. A useful test suite must be evaluated not only by what it executes, but also by what it would recognize as incorrect.
Further reading: Google — Mutation Testing and Maton, Kapfhammer & McMinn — Where Tests Fall Short.
Tests can remain green while their assumptions become outdated
There is another limitation that is easy to overlook: tests operate under assumptions about their environment and dependencies. These assumptions may concern database schemas, external service contracts, authentication behavior, configuration, dependency versions or infrastructure conditions. Some are represented directly in the repository, while others depend on systems and policies that the development team does not control.
Imagine an application that integrates with an external service. Its test suite uses a mock that reproduces the service's expected response, and all local tests pass. Later, the external provider changes its response format, but the mock continues reproducing the previous contract. The repository has not changed, and the tests may still pass because the behavior being evaluated is the behavior of the mock, not the current behavior of the external service.
The tests have not necessarily become incorrect; their scope simply does not establish continued compatibility with the external dependency. This distinction matters because assumptions can change independently of code. A dependency may remain at the same version while a provider changes its service, a policy changes, or an external contract becomes deprecated. A review process triggered exclusively by repository changes will not necessarily detect these situations.
This means that the validity of a test suite also depends on how its assumptions are maintained. Observable external behavior may require integration checks or scheduled probes, while changes communicated through vendor notices or policy updates may require an identified owner and an explicit review trigger. These mechanisms serve different purposes, but they address the same underlying question: what evidence supports the continued validity of the conditions on which the tests depend?
A test suite should not be treated as permanently reliable simply because it has remained green. Its assumptions, dependencies and expected behaviors need to be reconsidered as the surrounding system changes.
What should a passing test suite actually establish?
The objective is not to diminish software testing. Testing remains essential for discovering defects, evaluating behavior and reducing software risks. The objective is to interpret its results without attributing more certainty to them than they can support.
Before relying on a passing suite to justify a merge, release or other engineering decision, teams should be able to explain which behaviors were evaluated, which properties were actually asserted, what kinds of changes the tests could detect and which assumptions remain dependent on external conditions. They should also be able to identify the limitations that the tests do not resolve and determine whether those limitations are acceptable for the decision being considered.
A passing suite supports a bounded conclusion: the executed cases did not produce failures against their encoded expectations under the conditions in which they were evaluated. That is meaningful evidence, but it is not an independent demonstration that the software is correct or that every relevant risk has been addressed.
Testing becomes more valuable when its results are interpreted alongside their scope, assumptions and limitations. The important question is not simply whether the tests pass, but whether their evidence is appropriate for the conclusion the team intends to draw.
What do these tests actually establish, what could they have missed, and how much confidence should their results provide?
That is the difference between collecting passing tests and building trustworthy engineering evidence.
A question for practitioners
When your test suite passes, what do you examine beyond the coverage percentage?
Do you evaluate assertion quality, mutation testing, requirement traceability or whether the assumptions behind existing tests remain valid?
I'm interested in how engineering teams determine whether their test suites are becoming more effective—not merely larger.
CODE IN THE MARGINS
When the margins push engineering forward.
