Measuring and Mitigating Gaps in Structural Testing
Soneya Binta Hossain, Matthew B. Dwyer, Sebastian G. Elbaum, Anh Nguyen-Tuong
Abstract
Structural code coverage is a popular test adequacy metric that measures the percentage of program structure (e.g., statement, branch, decision) executed by a test suite. While structural coverage has several benefits, previous studies suggested that code coverage is not a good indicator of a test suite's fault-detection effectiveness as coverage computation does not consider test oracle quality. In this research, we formally define the coverage gap in structural testing as the percentage of program structure that is executed but not observed by any test oracles. Our large-scale empirical study of 13 Java applications, 16K test cases and 51.6K test assertions shows that even for mature test suites, the gap can be as high as 51 percentage points (pp) and 34pp on average. Our study reveals that the coverage gap strongly and negatively correlates with a test suite's fault-detection effectiveness. To mitigate gaps, we propose a lightweight static analysis of program dependencies to produce a ranked recommendation of test focus methods that can reduce the gap and improve test suite quality. When considering 34.8K assertions in the test suite as ground truth, the recommender suggests two-thirds of the focus methods written by developers within the top five recommendations.
Ask about this paper
Ask your agent about it.
Lune has read the top-tier papers around this one, so every answer names the papers it rests on.
Your agent calls
Lunesearch_papers
Free to start. No credit card required.
Terminal
Install the CLIlune papers get 6809d021-9e7f-460a-a9e4-e36a7f08e91bCited by top-tier papers4
- Neural-Based Test Oracle Generation: A Large-Scale Evaluation and Lessons LearnedSoneya Binta Hossain, Antonio Filieri, Matthew B. Dwyer, Sebastian G. Elbaum et al.FSE 2023 · 30 citations
- TOGLL: Correct and Strong Test Oracle Generation with LLMSSoneya Binta Hossain, Matthew B. DwyerICSE 2025 · 12 citations
- A First Look at the Inheritance-Induced Redundant Test ExecutionDong Jae Kim, Jinqiu Yang, Tse-Hsun ChenICSE 2024 · 2 citations
- Metamorphic CoverageJinsheng Ba, Yuancheng Jiang, Manuel RiggerISSTA 2026
Related papers
- State Field Coverage: A Metric for Oracle QualityFacundo Molina, Nazareno Aguirre, Alessandra GorlaASE 2025 · 1 citation
- Navigating Mobile Testing Evaluation: A Comprehensive Statistical Analysis of Android GUI Testing MetricsYuanhong Lan, Yifei Lu, Minxue Pan, Xuandong LiASE 2024 · 4 citations
- Revisiting the Relationship Between Fault Detection, Test Adequacy Criteria, and Test Set SizeYiqun T. Chen, Rahul Gopinath, Anita Tadakamalla, Michael D. Ernst et al.ASE 2020 · 48 citations
- Testing Retrieval-Augmented Generation Systems with Chunk CoverageJinhan Kim, Samuele Pasini, Paolo TonellaISSTA 2026
- Revealing Regressions: A Comparative Study of State-Capture Strategies in Validating Program BehaviorHang Du, Vijay Krishna Palepu, James A. JonesFSE 2026 · 2 citations
