当前位置: X-MOL 学术ACM Trans. Softw. Eng. Methodol. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Diversifying Focused Testing for Unit Testing
ACM Transactions on Software Engineering and Methodology ( IF 4.4 ) Pub Date : 2021-04-19 , DOI: 10.1145/3447265
Héctor D. Menéndez 1 , Gunel Jahangirova 2 , Federica Sarro 3 , Paolo Tonella 2 , David Clark 3
Affiliation  

Software changes constantly, because developers add new features or modifications. This directly affects the effectiveness of the test suite associated with that software, especially when these new modifications are in a specific area that no test case covers. This article tackles the problem of generating a high-quality test suite to cover repeatedly a given point in a program, with the ultimate goal of exposing faults possibly affecting the given program point. Both search-based software testing and constraint solving offer ready, but low-quality, solutions to this: Ideally, a maximally diverse covering test set is required, whereas search and constraint solving tend to generate test sets with biased distributions. Our approach, Diversified Focused Testing (DFT), uses a search strategy inspired by GödelTest. We artificially inject parameters into the code branching conditions and use a bi-objective search algorithm to find diverse inputs by perturbing the injected parameters, while keeping the path conditions still satisfiable. Our results demonstrate that our technique, DFT, is able to cover a desired point in the code at least 90% of the time. Moreover, adding diversity improves the bug detection and the mutation killing abilities of the test suites. We show that DFT achieves better results than focused testing, symbolic execution, and random testing by achieving from 3% to 70% improvement in mutation score and up to 100% improvement in fault detection across 105 software subjects.

中文翻译:

单元测试的多样化集中测试

软件不断变化,因为开发人员添加了新功能或修改。这直接影响与该软件相关的测试套件的有效性,尤其是当这些新修改位于没有测试用例涵盖的特定区域时。本文解决了生成高质量测试套件以重复覆盖程序中给定点的问题,最终目标是暴露可能影响给定程序点的故障。基于搜索的软件测试和约束求解都提供了现成但质量低的解决方案:理想情况下,最大限度地多样化覆盖测试集是必需的,而搜索和约束求解往往会生成具有偏差分布的测试集。我们的方法,多元化集中测试 (DFT),使用了受 GödelTest 启发的搜索策略。我们人为地将参数注入代码分支条件,并使用双目标搜索算法通过扰动注入的参数来找到不同的输入,同时保持路径条件仍然可以满足。我们的结果表明,我们的技术 DFT 能够在至少 90% 的时间内覆盖代码中的所需点。此外,增加多样性提高了测试套件的错误检测和突变消除能力。我们表明 DFT 比集中测试、符号执行、
更新日期:2021-04-19
down
wechat
bug