Understanding the potentially confounding effect of test suite size in test effectiveness evaluation
Background: Code coverage and mutation score serve as pivotal test effectiveness metrics used to assess a test suite's ability to uncover actual defects. However, prior research has produced inconsistent or even conflicting findings regarding their correlation with defect detection capability, particularly concerning the impact of test suite size. Problem: The extent of the potentially confounding effect of test suite size in test effectiveness evaluation context is not clear, nor is the method to remove the potentially confounding effect, or the influence of this removal on the performance of test suite optimization. Objective: Our goal is to deeply understand how test suite size affects the true relationship between test effectiveness metrics and a test suite's ability to detect actual defects. Method: We first employ statistical methods to examine the extent of the potentially confounding effect of test suite size in the context of test effectiveness evaluation. After that, we propose a linear regression-based method to remove the potentially confounding effect of test suite size. Finally, we empirically explore the impact of this removal method on test suite optimization. Result: Our experimental results, based on the Defects4J defect dataset, uncovers that: (1) the confounding effect of test suite size on the associations between test effectiveness metrics and defect detection capability in general exists; (2) the proposed linear regression-based method can effectively remove the confounding effect; and (3) after removing the confounding effect, mutation score demonstrates superior effectiveness in predicting test suite effectiveness, while statement coverage is the least effective metric. Furthermore, both coverage-based and mutation-based test suite reduction exhibit enhanced cost-effectiveness in defect detection, and there is a marginal improvement in the speed of defect detection for coverage-based test case prioritization. Conclusion: When using test effectiveness metrics to assess test suite effectiveness, it is crucial to eliminate the influence of test suite size.
Authors
- Yifan Huang (ORCID: https://orcid.org/0009-0008-7055-5016)
- Yuming Zhou (ORCID: https://orcid.org/0000-0002-4645-2526)
- Yibiao Yang (ORCID: https://orcid.org/0000-0003-1153-2013)
- Shan Gao (ORCID: https://orcid.org/0009-0006-2695-2968)
- Zeyu Lu (ORCID: https://orcid.org/0009-0001-7370-6421)
- Yang Wang (ORCID: https://orcid.org/0000-0002-6771-2139)
- Yanhui Li (ORCID: https://orcid.org/0000-0003-2282-7175)
- Lin Chen (ORCID: https://orcid.org/0000-0003-2352-2226)
- Peng Zhang (ORCID: https://orcid.org/0000-0003-2902-2249)
- Maolin Sun (ORCID: https://orcid.org/0000-0001-5617-2205)
- Yi Rong
- Xuan Wang
Institutions
- Nanjing University (CN)
Publication Details
- Journal
- ACM Transactions on Software Engineering and Methodology
- Published
- 2025-08-28
- DOI
- https://doi.org/10.1145/3748504
- Primary Topic
- Software Testing and Debugging Techniques
- Type
- article
- Field-Weighted Citation Impact
- 0.00