arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2110.02682cs.SE
收藏

缺陷预测器需要有多好才能指导基于搜索的软件测试?

How good does a Defect Predictor need to be to guide Search-Based Software Testing?

Anjana Perera, Burak Turhan, Aldeida Aleti, Marcel Böhme

摘要:

缺陷预测器、静态缺陷检测器和检查代码的人员可以在通过测试发现程序中有缺陷的部分之前找到它们。诸如基于搜索的软件测试(SBST)技术之类的自动测试生成器可以使用该信息来将它们对测试用例的搜索引导到可能存在错误的代码,从而加速检测现有错误的过程。然而,这些工具或人类给出的预测往往是不精确的,这可能会误导SBST技术,并可能降低其性能。在本文中,我们研究了缺陷预测的不精确性对SBST缺陷检测有效性的影响。我们的研究发现,召回的缺陷预测,即,正确识别错误代码的概率对SBST的错误检测有效性有显著影响,且效应量较大。另一方面,精确度的影响,一个衡量假警报,是没有实际意义的一个非常小的效果大小所示。特别是,SBST技术发现7.5个错误平均减少每5%的召回(420个错误)。在结合缺陷预测和SBST的背景下,我们的建议是在牺牲精度的情况下增加缺陷预测器的召回率,同时保持至少75%的精度。考虑到缺陷预测器的不精确性,特别是低召回值,SBST技术应该被设计为搜索测试用例,这些测试用例也覆盖了程序中预测的非错误部分,同时优先考虑被预测为错误的部分。

英文摘要:

Defect predictors, static bug detectors and humans inspecting the code can locate the parts of the program that are buggy before they are discovered through testing. Automated test generators such as search-based software testing (SBST) techniques can use this information to direct their search for test cases to likely buggy code, thus speeding up the process of detecting existing bugs. However, often the predictions given by these tools or humans are imprecise, which can misguide the SBST technique and may deteriorate its performance. In this paper, we study the impact of imprecision in defect prediction on the bug detection effectiveness of SBST. Our study finds that the recall of the defect predictor, i.e., the probability of correctly identifying buggy code, has a significant impact on bug detection effectiveness of SBST with a large effect size. On the other hand, the effect of precision, a measure for false alarms, is not of meaningful practical significance as indicated by a very small effect size. In particular, the SBST technique finds 7.5 less bugs on average (out of 420 bugs) for every 5% decrements of the recall. In the context of combining defect prediction and SBST, our recommendation for practice is to increase the recall of defect predictors at the expense of precision, while maintaining a precision of at least 75%. To account for the imprecision of defect predictors, in particular low recall values, SBST techniques should be designed to search for test cases that also cover the predicted non-buggy parts of the program, while prioritising the parts that have been predicted as buggy.

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

↑