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

利用模型减少软件仓库中的测试用例

Leveraging Models to Reduce Test Cases in Software Repositories

Golnaz Gharachorlu, Nick Sumner

摘要:

给定一个失败的测试用例,测试用例缩减产生一个更小的测试用例,重现失败。由于使用较小的测试用例进行重复试验和错误,此过程可能非常耗时。目前的技术通过只探索语法上有效的候选项来加速约简,但是它们仍然在语义上无效的候选项上花费大量的精力。在本文中,我们提出了一个模型引导的方法来加快测试用例的减少。该方法训练一个由句法测试用例属性驱动的语义属性模型。通过使用这个模型,我们可以跳过测试,即使是语法上有效的测试用例候选者也不太可能成功。我们评估了这个模型指导下的减少一套14个大型模糊生成的C测试案例,从两个著名的C编译器,GCC和Clang的错误存储库。我们的研究结果表明,平均精度为77%,我们可以减少14%至61%的删除试验的数量。我们观察到与最先进的技术相比,复位时间几何平均提高了30%,同时保持了相似的复位能力。

英文摘要:

Given a failing test case, test case reduction yields a smaller test case that reproduces the failure. This process can be time consuming due to repeated trial and error with smaller test cases. Current techniques speed up reduction by only exploring syntactically valid candidates, but they still spend significant effort on semantically invalid candidates. In this paper, we propose a model-guided approach to speed up test case reduction. The approach trains a model of semantic properties driven by syntactic test case properties. By using this model, we can skip testing even syntactically valid test case candidates that are unlikely to succeed. We evaluate this model-guided reduction on a suite of 14 large fuzzer-generated C test cases from the bug repositories of two well-known C compilers, GCC and Clang. Our results show that with an average precision of 77%, we can decrease the number of removal trials by 14% to 61%. We observe a 30% geomean improvement in reduction time over the state of the art technique while preserving similar reduction power.

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

↑