arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2512.11223cs.SE
收藏

覆盖率不够:基于SBFL的手动测试与自动测试洞察

Coverage Isn't Enough: SBFL-Driven Insights into Manually Created vs. Automatically Generated Tests

The University of Osaka(大阪大学)

Sasara Shimizu, Yoshiki Higo

AI总结:

本研究通过比较SBFL得分和覆盖率,揭示自动测试与手动测试在故障定位中的优劣,为测试方法的结合提供依据。

摘要:

软件开发中的测试阶段是至关重要的,但手动创建测试用例可能耗费大量时间。因此,对更高效的测试方法需求日益增长。为了减轻开发人员的负担,已经开发出多种自动化测试生成工具,并进行了若干研究以评估这些工具生成的测试用例的有效性。然而,大多数研究主要关注覆盖率指标,只有少数研究探讨测试用例在故障定位方面的效果,特别是通过突变测试引入的人工故障。在本研究中,我们比较了自动生成功能测试的SBFL(基于光谱的故障定位)得分和代码覆盖率,与手动创建的测试用例。SBFL得分表明使用SBFL技术定位故障的准确性。通过将SBFL得分作为评估指标——一种在先前测试生成研究中很少使用的方法,我们旨在为手动创建和自动生成功能测试的优缺点提供新的见解。我们的实验结果表明,自动生成功能测试在分支覆盖率方面优于手动创建的测试用例,但其SBFL得分较低,特别是对于具有深度嵌套结构的代码。这些发现为如何有效结合自动生成功能测试和手动创建测试方法提供了指导。

英文摘要:

The testing phase is an essential part of software development, but manually creating test cases can be time-consuming. Consequently, there is a growing need for more efficient testing methods. To reduce the burden on developers, various automated test generation tools have been developed, and several studies have been conducted to evaluate the effectiveness of the tests they produce. However, most of these studies focus primarily on coverage metrics, and only a few examine how well the tests support fault localization-particularly using artificial faults introduced through mutation testing. In this study, we compare the SBFL (Spectrum-Based Fault Localization) score and code coverage of automatically generated tests with those of manually created tests. The SBFL score indicates how accurately faults can be localized using SBFL techniques. By employing SBFL score as an evaluation metric-an approach rarely used in prior studies on test generation-we aim to provide new insights into the respective strengths and weaknesses of manually created and automatically generated tests. Our experimental results show that automatically generated tests achieve higher branch coverage than manually created tests, but their SBFL score is lower, especially for code with deeply nested structures. These findings offer guidance on how to effectively combine automatically generated and manually created testing approaches.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑