当前位置: 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.)
An Adaptive Search Budget Allocation Approach for Search-Based Test Case Generation
ACM Transactions on Software Engineering and Methodology ( IF 6.6 ) Pub Date : 2021-04-23 , DOI: 10.1145/3446199
Simone Scalabrino 1 , Antonio Mastropaolo 1 , Gabriele Bavota 2 , Rocco Oliveto 1
Affiliation  

Search-based techniques have been successfully used to automate test case generation. Such approaches allocate a fixed search budget to generate test cases aiming at maximizing code coverage. The search budget plays a crucial role; due to the hugeness of the search space, the higher the assigned budget, the higher the expected coverage. Code components have different structural properties that may affect the ability of search-based techniques to achieve a high coverage level. Thus, allocating a fixed search budget for all the components is not recommended and a component-specific search budget should be preferred. However, deciding the budget to assign to a given component is not a trivial task. In this article, we introduce Budget Optimization for Testing (BOT), an approach to adaptively allocate the search budget to the classes under test. BOT requires information about the branch coverage that will be achieved on each class with a given search budget. Therefore, we also introduce BRANCHOS, an approach that predicts coverage in a budget-aware way. The results of our experiments show that (i) BRANCHOS can approximate the branch coverage in time with a low error, and (ii) BOT can significantly increase the coverage achieved by a test generation tool and the effectiveness of generated tests.

中文翻译:

基于搜索的测试用例生成的自适应搜索预算分配方法

基于搜索的技术已成功用于自动化测试用例生成。这种方法分配固定的搜索预算来生成旨在最大化代码覆盖率的测试用例。搜索预算起着至关重要的作用;由于搜索空间巨大,分配的预算越高,预期覆盖率越高。代码组件具有不同的结构属性,这些属性可能会影响基于搜索的技术实现高覆盖率的能力。因此,不建议为所有组件分配固定的搜索预算,而应首选特定于组件的搜索预算。但是,决定分配给给定组件的预算并非易事。在本文中,我们介绍了测试预算优化 (BOT),这是一种将搜索预算自适应地分配给被测类的方法。BOT 需要有关在给定搜索预算的每个类别上将实现的分支覆盖率的信息。因此,我们还介绍了 BRANCHOS,这是一种以预算感知方式预测覆盖率的方法。我们的实验结果表明,(i) BRANCHOS 可以以低误差及时逼近分支覆盖率,(ii) BOT 可以显着提高测试生成工具实现的覆盖率和生成测试的有效性。
更新日期:2021-04-23
down
wechat
bug