arXiv:2610.32548cs.SEOct 2026

Manuscript Offprint

arXiv:2610.32548

Beyond Coverage and Mutation: A Blind-Spot Analysis of LLM-Generated Unit Tests

Xiaoyu Shi, Wenqiang Luo, Boyang Yang, Haoye Tian

XIAOYU SHI, Aalto University, Finland

WENQIANG LUO, City University of Hong Kong, China

BOYANG YANG, Yanshan University, China

HAOYE TIAN ⊗^{\otimes}, Aalto University, Finland

Existing evaluation protocols for LLM-generated unit tests rely on aggregate metrics such as branch coverage and mutation score. These metrics quantify the extent to which a test suite exercises program behavior, but do not identify the behavioral obligations it systematically leaves unchecked. We propose BLINDSPOTEVAL, an obligation-based evaluation framework aligned with the Arrange-Act-Assert pattern. The framework comprises three metrics, Boundary-Value Adequacy, Control-Flow Adequacy, and Oracle Strength, complemented by an assessment of execution reliability. We also introduce OBLIGBENCH, a complexity-stratified Java benchmark comprising 895 complex and 700 low-complexity functions with source-side obligation annotations. Applied to 14,320 tests generated by four LLMs under four prompting strategies, BLINDSPOTEVAL reveals systematic blind spots that aggregate metrics do not distinguish. Before adequacy scoring, 19.7% of tests fail to execute successfully, with failures ranging from compilation errors to runtime exceptions. Among test failures, 15.6% involve incorrect assertions, termed wrong-oracle failures. Such tests can contribute to code coverage despite failing, illustrating that coverage alone does not establish oracle correctness. Among executable tests, LLMs readily cover directly inferable boundary cases but struggle with non-inferable ones. Coverage of null, negative, and empty arguments reaches only 34.8%, 23.8%, and 38.8%, compared with average coverage above 93% for booleans. Exceptional control flow exhibits a similar pattern. Exceptional and fallback behavior is weakly checked, with CFA scores of 0.100 for catch blocks and 0.312 for default groups. Across both dimensions, LLM-generated tests exhibit the happy-path bias observed in human-written tests, concentrating on normal inputs and expected flows while leaving unusual values and exceptional paths unchecked. Oracle strength is high on average but uneven, with weaker assertions for object return property values and exceptions. These blind spots also occur in low-complexity functions, suggesting that code complexity alone does not explain them. BLINDSPOTEVAL provides construct-level adequacy profiles that identify under-tested obligation types and can guide targeted improvements beyond those supported by aggregate scores alone.

1 Introduction

Software testing is fundamental to software quality, it provides a primary mechanism for developers to assess whether code behaves as intended and whether changes introduce regressions [2, 38]. As large language models (LLMs) increasingly support code generation and modification [9], automated unit test generation has become correspondingly important. Research on LLM-based test generation has advanced rapidly, producing a range of approaches. Zero-shot prompting generates tests directly from the function signature and body [10, 48, 52, 53, 57], feedback-based approaches iteratively refine tests using coverage or mutation signals [11, 13, 58], and planning-based approaches first reason about the function's intent [19]. Recent tools regularly produce tests that compile, run, and achieve high branch coverage and competitive mutation scores [10, 26].

High aggregate scores, however, do not necessarily indicate thorough testing. Prior work commonly evaluates LLM-generated tests using branch coverage, which measures the proportion of program branches executed [15, 60], and mutation score, which measures the proportion of artificially injected faults detected [12, 27]. A replicability study found that these metrics correlate with fault detection only under restricted conditions [59]. Although useful for summarizing

Authors' Contact Information: Xiaoyu Shi, xiaoyu.shi@aalto.fi, Aalto University, Espoo, Finland; Wenqiang Luo, wenqialuo4c@my.cityu.edu.hk, City University of Hong Kong, Hong Kong, China; Boyang Yang, yby@ysu.edu.cn, Yanshan University, Hebei, China; Haoye Tian, haoye.tian@aalto.fi, Aalto University, Espoo, Finland.

Shi et al.

test effectiveness, these metrics do not directly identify which obligations remain unchecked. For example, tests using only ordinary inputs may achieve the same line coverage as tests that also check boundary values whenever those inputs traverse the same statements. Similarly, a high mutation score indicates sensitivity to injected changes without necessarily establishing whether tests adequately check particular input boundaries, exceptional paths, or behavioral properties. These distinctions have practical consequences. Omitting null inputs may leave null-handling faults undetected, failing to exercise exception handlers may leave exception-swallowing behavior unchecked, and weak assertions may allow incorrect results to pass unnoticed. Scores of 90% mutation adequacy and 80% branch coverage alone do not establish whether null inputs, exception paths, or object-state invariants have been adequately tested.

Unit tests are commonly structured according to the Arrange-Act-Assert (AAA) pattern [37, 41]. The Arrange phase prepares the inputs, the Act phase invokes the function, and the Assert phase verifies the resulting behavior. This structure suggests three complementary evaluation dimensions, (1) tests should cover relevant input boundary values during Arrange; (2) tests should exercise relevant control-flow alternatives during Act; and (3) tests should verify the resulting behavior through their assertions. We refer to the behaviors that tests should exercise or verify, as identified from a function's implementation, as obligations. Our aim is to identify systematic blind spots in how LLM-generated tests satisfy these obligations.

Existing approaches primarily assess generated tests through aggregate metrics. CoverAgent [11] seeks to maximize branch coverage but provides no construct-level diagnosis of what remains unchecked; MuTAP [13] and ChatTester [58] use mutation feedback to improve tests, with aggregate mutation scores serving as an evaluation measure. To the best of our knowledge, no existing framework jointly assesses LLM-generated tests at the obligation level across all three AAA dimensions. We propose BLINDSPOTEVAL, an obligation-based evaluation framework aligned with the AAA pattern [37, 41]. For each function under test, the framework assesses which input boundaries, control-flow alternatives, and behavioral properties the generated tests exercise or verify.

Before assessing adequacy, we examine execution reliability through the following research question:

RQ1 (Executability). To what extent do LLMs generate compilable and runnable tests, and what are the common failure modes? We measure execution success across multiple LLMs and prompting strategies and characterize failure modes to distinguish execution failures from adequacy gaps.

For tests that compile and execute successfully, we then investigate three dimensions of adequacy.

RQ2 (Arrange). To what extent do LLM-generated tests cover the input boundary values relevant to a function? We propose Boundary-Value Adequacy (BVA), which statically extracts per-parameter obligations and assesses whether the generated tests cover them.

RQ3 (Act). To what extent do LLM-generated tests adequately exercise the control-flow alternatives within a function? We propose Control-Flow Adequacy (CFA), which uses extreme-condition mutation to assess obligations associated with conditions, exception handlers, and switch cases.

RQ4 (Assert). To what extent do LLM-generated tests verify a function’s outputs and exception behavior? We propose Oracle Strength (OS), which mutates return values and exception behavior and assesses whether the tests’ assertions detect these changes. We exclude incidental kills caused by unexpected exceptions or crashes from the killed-mutant count, so that these failures do not inflate the estimated strength of the test oracles.

Finally, we examine whether the observed blind spots also occur in less complex code:

RQ5 (Complexity). To what extent do the observed blind spots persist across levels of code complexity? We compare complex functions with a low-complexity control set to assess whether the identified gaps are concentrated in complex code or also occur in simpler functions.

To answer these questions we need a benchmark of real-world functions with known obligation profiles and a complexity-controlled comparison set. Existing benchmarks such as TestGenEval [26] evaluate test generation quality using aggregate metrics but do not provide obligation-level annotations together with a complexity-stratified comparison set. We therefore introduce ObligBench, a Java benchmark derived from The Stack v2 [35]. It comprises 895 complex functions under test, selected from the top 5% by cyclomatic [36] and cognitive [8] complexity, and a low-complexity control set of 700 functions. In the main experiment, we evaluate four LLMs (GPT-5.4, Gemma-4-31B, Gemini-3.6-flash, and Qwen3-Coder-30B) under four prompting strategies (zero-shot, intention-planning, mutation-feedback, and Panta [19]) on the 895 complex functions, yielding 14,320 generated tests for RQ1-RQ4. For RQ5, we additionally evaluate tests generated for the 700-function low-complexity control set.

Our results reveal systematic adequacy blind spots that aggregate coverage and mutation scores do not distinguish. LLM-generated tests struggle most with inputs requiring semantic reasoning about the function's contract, as null inputs are covered in only 34.8% of applicable cases, negative inputs in 23.8%, and empty inputs in 38.8%. The same happy-path bias appears in control-flow adequacy, with scores of 0.100 for catch blocks and 0.312 for default groups, as reaching these constructs requires deliberately out-of-domain inputs that LLMs tend to avoid. Taken together, these patterns show that LLMs exhibit the happy-path bias long observed in human-written test suites [5, 6] that, attention is concentrated on normal inputs and expected execution flows, while unusual values and exceptional paths are systematically omitted, forming blind spots that aggregate metrics do not surface. On the assertion side, oracle strength is high overall but weak for object returns when concrete default mutation can be made, where models default to coarse checks rather than field-level value assertions. Section 6 presents the full results for all five research questions.

This paper contributes:

(1) Evaluation framework. BLINDSPOTEVAL combines an executability assessment with three AAA-aligned adequacy metrics (BVA, CFA, and OS). It characterizes execution failures before adequacy scoring and produces construct-level profiles that identify under-tested obligation types, supporting targeted improvements to generated tests.

(2) Benchmark. OBLIGBENCH comprises 895 complex and 700 low-complexity real-world Java functions under test (FUTs), with source-side obligation annotations and immutable-FUT constraints.

(3) Empirical study. An evaluation of four LLMs under four prompting strategies, comprising 14,320 generated tests on complex functions, characterizes execution failure modes and identifies recurring gaps in boundary-value coverage, exceptional control flow, and oracle strength. An additional study on 700 low-complexity functions indicates that these patterns are more pronounced in complex functions but also occur in simpler code. All artifacts are publicly available.

References (30)