当前位置: X-MOL 学术IEEE Trans. Softw. Eng. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Coverage Goal Selector for Combining Multiple Criteria in Search-Based Unit Test Generation
IEEE Transactions on Software Engineering ( IF 7.4 ) Pub Date : 2024-02-16 , DOI: 10.1109/tse.2024.3366613
Zhichao Zhou 1 , Yuming Zhou 2 , Chunrong Fang 2 , Zhenyu Chen 2 , Xiapu Luo 3 , Jingzhu He 1 , Yutian Tang 4
Affiliation  

Unit testing is critical to the software development process, ensuring the correctness of basic programming units in a program (e.g., a method). Search-based software testing (SBST) is an automated approach to generating test cases. SBST generates test cases with genetic algorithms by specifying the coverage criterion (e.g., branch coverage). However, a good test suite must have different properties, which cannot be captured using an individual coverage criterion. Therefore, the state-of-the-art approach combines multiple criteria to generate test cases. Since combining multiple coverage criteria brings multiple objectives for optimization, it hurts the test suites’ coverage for certain criteria compared with using the single criterion. To cope with this problem, we propose a novel approach named smart selection . Based on the coverage correlations among criteria and the subsumption relationships among coverage goals, smart selection selects a subset of coverage goals to reduce the number of optimization objectives and avoid missing any properties of all criteria. We conduct experiments to evaluate smart selection on $400$ Java classes with three state-of-the-art genetic algorithms under the $2$ -minute budget. On average, smart selection outperforms combining all goals on $65.1\%$ of the classes having significant differences between the two approaches. Secondly, we conduct experiments to verify our assumptions about coverage criteria relationships. Furthermore, we assess the coverage performance of smart selection under varying budgets of $5$ , $8$ , and $10$ minutes and explore its effect on bug detection, confirming the advantage of smart selection over combining all goals.

中文翻译:

用于在基于搜索的单元测试生成中组合多个标准的覆盖目标选择器

单元测试对于软件开发过程至关重要,它确保程序中基本编程单元(例如方法)的正确性。基于搜索的软件测试(SBST)是一种生成测试用例的自动化方法。 SBST 通过指定覆盖标准(例如分支覆盖),使用遗传算法生成测试用例。然而,一个好的测试套件必须具有不同的属性,而这些属性无法使用单独的覆盖标准来捕获。因此,最先进的方法结合了多个标准来生成测试用例。由于组合多个覆盖标准会带来多个优化目标,因此与使用单一标准相比,它会损害测试套件对某些标准的覆盖范围。为了解决这个问题,我们提出了一种名为智能选择的新方法 。基于准则之间的覆盖相关性和覆盖目标之间的包含关系,智能选择选择覆盖目标的子集,以减少优化目标的数量并避免遗漏所有准则的任何属性。我们进行实验来评估智能选择$400$具有三种最先进的遗传算法的 Java 类$2$ 分钟预算。平均而言,明智的选择优于将所有目标结合起来$65.1\%$两种方法之间存在显着差异的类。其次,我们进行实验来验证我们对覆盖标准关系的假设。此外,我们评估了不同预算下智能选择的覆盖性能$5$ ,$8$ , 和$10$分钟并探索其对错误检测的影响,确认智能选择相对于组合所有目标的优势。
更新日期:2024-02-16
down
wechat
bug