arXiv(opens in a new tab)cs.SEOct 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2610.33708

Covered Is Not Checked: Which Branch Outcomes Would Your Tests Notice?

Md Nafiu Rahman, Cemil Canbaz, Soneya Binta Hossain

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

MD NAFIU RAHMAN*, Brac University, Bangladesh

CEMIL CANBAZ*, Bilkent University, Türkiye

SONEYA BINTA HOSSAIN, The University of Texas at Dallas, USA

Code coverage reports which parts of a program the tests run. It does not report whether the tests would detect a fault in that code, so a suite can reach high coverage while its assertions check little of the behavior it runs. Checked coverage narrows coverage to the code that influences values examined by test oracles, and it finds that influence with dynamic program slicing. Slicing is expensive, Java dynamic slicers lag behind current language versions and struggle with complex programs, and the difficulty grows as checked coverage moves from statements to stronger structural criteria such as object branch coverage or Modified Condition/Decision Coverage (MC/DC).

We present Veritas, a different way to determine whether covered behavior is actually checked, without dynamic slicing. Rather than infer checking through dependence, Veritas tests it directly. We focus on object branch coverage (OBC), a stronger structural criterion that operates on compiled code and has been shown to provide fault-detection effectiveness comparable to source-level MC/DC, a criterion required for the highest assurance level of DO-178C. For each covered object-branch outcome, Veritas forces the decision to take the opposite outcome and observes whether the existing tests detect the change. An outcome is considered checked only when the mutation changes its execution, a previously passing test fails, and the failure can be attributed to that outcome. Veritas therefore separates behavior that is merely executed from behavior for which the test suite provides concrete evidence of fault detection, while avoiding the dynamic program analysis on which previous checked-coverage techniques depend.

We evaluated Veritas on eleven open-source Java projects with 51,382 object-branch outcomes. First, 18% of covered outcomes can be changed without causing any test to fail, showing that coverage alone can hide important testing weaknesses. Second, Veritas helps explain why mutants survive. About half are never activated by the existing inputs; the rest are activated but the tests do not detect the change. Third, compared with slicing-based checked coverage, Veritas finds 4,763 cases where tests detect a change that slicing does not credit, while 19% of the cases slicing considers checked are not detected when changed. Finally, the gap reflects test effectiveness: as assertions are weakened, the gap grows and fault detection falls on every project, and code locations controlled by these weakly checked outcomes are 12.4–54.7 percentage points (pp) more likely to have an undetected independent fault than locations controlled by checked outcomes.

CCS Concepts: • Software and its engineering → Software testing and debugging.

Additional Key Words and Phrases: checked coverage, object branch coverage, mutation testing, test oracles

ACM Reference Format:

Md Nafiu Rahman, Cemil Canbaz, and Soneya Binta Hossain. 2026. Covered Is Not Checked: Which Branch Outcomes Would Your Tests Notice?. 1, 1 (October 2026), 20 pages. https://doi.org/10.1145/nnnnnnn.nnnnnnn

1 Introduction

Structural coverage is a key part of software testing. It is widely used to check whether a test suite exercises the program [4], and stronger criteria are required in high-assurance settings.

∗^{*}These authors contributed equally to this work.

Authors' Contact Information: Md Nafiu Rahman, nafiu.rahman@bracu.ac.bd, Brac University, Dhaka, Bangladesh; Cemil Canbaz, cemil.canbaz@ug.bilkent.edu.tr, Bilkent University, Ankara, Türkiye; Soneya Binta Hossain, sbhossain@utdallas.edu, The University of Texas at Dallas, Richardson, Texas, USA.

  1. ACM XXXX-XXXX/2026/10-ART https://doi.org/10.1145/nnnnnnn.nnnnnnn

Md Nafiu Rahman, Cemil Canbaz, and Soneya Binta Hossain

For example, DO-178C requires Modified Condition/Decision Coverage (MC/DC) [7] for Level A airborne software [27]. However, coverage only tells us whether code was executed. A test can execute a statement or branch and still fail to detect that its behavior is wrong. This distinction matters in practice: coverage is not strongly correlated with fault detection when suite size is controlled [17], suites with high coverage can still miss many faults [30], and assertions are strongly linked to fault-detection effectiveness [42]. The central question is which of these behaviors the tests would actually notice if they were wrong.

Checked coverage was introduced to address this blind spot. Schuler and Zeller count a statement as checked when it appears in a dynamic backward slice from a test assertion [28, 29]; Hossain et al. extended the idea to stronger structural criteria, including object branch coverage, and defined the difference between coverage and checked coverage as the coverage gap [15]. This is an important step because it brings the test oracle into coverage measurement. However, it also leaves two limitations. First, dependence is not detection: a covered element can influence a value examined by an assertion even when changing that element would not make the test fail. Second, computing checked coverage relies on program slicing [40], especially dynamic slicing [1], so its applicability is tied to a heavyweight program analysis that must support the program, libraries, and runtime being tested. The available Java dynamic slicers are also outdated. JavaSlicer (2008) still requires JDK 6 or 7, does not support Java 8 language features, cannot reconstruct dependencies across threads, and cannot trace several native and core-library methods [12, 13]. Slicer4J (2021) improves multithreading and framework support, but remains tied to Soot's Java 9 support, cannot slice dynamically generated classes, requires debug information for source-level mapping, and models framework and native methods using static summaries that can over-approximate dependencies [2]. Table 7 shows how these limitations manifest in practice in our study, including applicability, usable coverage, memory cost, and the substantial disagreement between dependence-based checking and actual test detection. These limitations become more consequential as checked coverage is applied beyond statements to richer structural criteria.

(a) Code under test

// Interval [start, end) boolean overlaps(Interval o) { return o.start < end && start < o.end; }

boolean adjacent(Interval o) { return (end == o.start) // d1 || o.end == start) // d2 && !overlaps(o); // d3 }

(b) Original test

// Covers 4 of the 6 outcomes @Test void adjacency() { var a = new Interval(0, 10); // touching assertTrue(a.adjacent( new Interval(10, 20)); // overlapping assertFalse(a.adjacent( new Interval(5, 20)); }

(c) Added test

// Covers no new outcome @Test void separatedIntervals() { var a = new Interval(0, 10); // apart assertFalse(a.adjacent( new Interval(15, 20)); }

Fig. 1. (a) The adjacent method, with the conditions of d1d_{1} and d2d_{2} boxed. (b) Its original test covers the false outcomes of d1d_{1} and d2d_{2}, but it still passes when either of them is forced to true. (c) The added test uses a new input (boxed) that detects both changes without covering any new branch outcome.

Figure 1 illustrates a limitation of checked coverage. The method adjacent returns true when two intervals touch ( d1d_{1} or d2d_{2}) without overlapping ( d3d_{3}). At the object-code level, ignoring the two decisions inside overlaps, these three decisions correspond to six branch outcomes, two for each decision. The original test covers four of the six branch outcomes, including the false outcomes of d1d_{1} and d2d_{2}, and slicing-based checked coverage marks all four as checked. Yet when either d1d_{1} or d2d_{2} is forced to true on the overlapping input, the execution changes but the test still passes.

Thus, these outcomes are both covered and considered checked, even though the existing test does not detect a change to their behavior.

The added test separatedIntervals exposes the difference. It covers no new outcome, but detects both changes. Structural coverage therefore remains exactly the same while the suite becomes better at detecting changes to the covered behavior. This is the distinction Veritas measures: not merely whether an outcome is executed or influences an asserted value, but whether changing its behavior is actually noticed by the test suite.

Our key insight is to replace inferred checking with demonstrated detection. For each covered outcome, we deliberately force the decision the other way and ask whether a test that exercised the outcome now fails. The mutant is therefore not a unit to count, but a controlled experiment on one covered behavior. We count an outcome as checked only when the forced change alters execution at its decision, a previously passing test fails, and the failure can be attributed to that outcome. This provides direct evidence that the test suite can detect a change to the covered behavior, without reconstructing a dynamic dependence slice.

We instantiate this idea over object branch coverage (OBC), a structural criterion over compiled code that prior work found comparable to source-level MC/DC in bug-finding efficacy [6]. We present Veritas, which measures object branch checked coverage without dynamic slicing. For each covered object-branch outcome, Veritas forces the opposite outcome and reruns only the tests that reached that decision. It then separates behavior that is uncovered, behavior that is covered but lacks detection evidence, and behavior for which a test demonstrably detects the change. For each result, Veritas records the mutant and tests that provide the evidence, turning the coverage gap into concrete information a developer can inspect. Figure 2 shows a high-level overview of our approach, with details provided in Sections 2 and 3.

We evaluate Veritas on eleven open-source Java projects with 51,382 object-branch outcomes through four complementary studies. We first measure the gap between covered and checked behavior and examine cases that Veritas exposes; second, we compare Veritas with conventional mutation testing on the same mutants; third, we compare it with slicing-based checked coverage on the same branch outcomes and tests; and finally, we test whether the measured gap is associated with independent fault detection by systematically weakening assertions and by comparing faults near checked outcomes with faults near outcomes whose change no test detects.

Four results stand out. First, 18% of covered branch outcomes can be changed without causing any test to fail, exposing weaknesses that coverage alone hides. In a sample of 22 of them, half need a new input rather than a stronger assertion, and about a third leave the program’s results unchanged. Second, when conventional mutation testing reports a surviving mutant, Veritas separates two different problems: 53% are never activated by the existing inputs, while 47% are activated but the existing tests still do not detect them. Third, compared with slicing-based checked coverage, Veritas finds 4,763 branch outcomes whose changes are detected by the tests but not credited by slicing, while 19% of the outcomes slicing considers checked are not detected when changed. Veritas also runs on all eleven projects, whereas Slicer4J [2] fails to produce a result on three of the eleven projects we attempted. Finally, the measured gap is associated with fault-detection effectiveness: weakening assertions increases the gap and reduces detection of independent faults on every project, and code locations controlled by such undetected outcomes are 12.4–54.7 percentage points more likely to have an undetected independent fault than locations controlled by checked outcomes.

The primary contributions of this paper are:

  • We formulate, to the best of our knowledge, the first detection-based checked coverage at object-branch granularity, replacing inferred dynamic dependence with direct evidence that a change to a covered outcome is exercised, detected, and attributable to that outcome.

Md Nafiu Rahman, Cemil Canbaz, and Soneya Binta Hossain

• We develop Veritas, an end-to-end methodology and implementation for Java bytecode that measures object branch coverage, checked coverage, and their gap without requiring slicing.

• We make the resulting coverage gap actionable by distinguishing outcomes that require new test inputs from those that are already exercised but require stronger checks, and by identifying the tests and mutations responsible for each result.

• We conduct a large-scale empirical study, comparing Veritas with structural coverage, conventional mutation testing, and slicing-based checked coverage, and independently evaluating its relationship with fault detection.

References (13)