首页> 外文期刊>Software Testing, Verification and Reliability >Choosing the fitness function for the job: Automated generation of test suites that detect real faults
【24h】

Choosing the fitness function for the job: Automated generation of test suites that detect real faults

机译:选择适合性的功能:自动生成检测实际故障的测试套件

获取原文
获取原文并翻译 | 示例

摘要

Search-based unit test generation, if effective at fault detection, can lower the cost of testing. Such techniques rely on fitness functions to guide the search. Ultimately, such functions represent test goals that approximate-but do not ensure-fault detection. The need to rely on approximations leads to two questions-can fitness functions produce effective tests and, if so, which should be used to generate tests? To answer these questions, we have assessed the fault-detection capabilities of unit test suites generated to satisfy eight white-box fitness functions on 597 real faults from the Defects4J database. Our analysis has found that the strongest indicators of effectiveness are a high level of code coverage over the targeted class and high satisfaction of a criterion's obligations. Consequently, the branch coverage fitness function is the most effective. Our findings indicate that fitness functions that thoroughly explore system structure should be used as primary generation objectives-supported by secondary fitness functions that explore orthogonal, supporting scenarios. Our results also provide further evidence that future approaches to test generation should focus on attaining higher coverage of private code and better initialization and manipulation of class dependencies.
机译:如果可以有效地进行故障检测,则基于搜索的单元测试生成可以降低测试成本。这样的技术依靠适应度函数来指导搜索。最终,这些功能代表的测试目标接近但不能确保故障检测。需要依赖近似值会导致两个问题-适应度函数能否产生有效的测试?如果是,则应使用哪个函数来生成测试?为了回答这些问题,我们评估了为满足Defects4J数据库中597个实际故障上的八个白盒适应度函数而生成的单元测试套件的故障检测能力。我们的分析发现,最有效的指标是针对目标类的高级别代码覆盖率和对标准义务的高度满意。因此,分支覆盖适应度功能最有效。我们的发现表明,彻底探索系统结构的适应度函数应被用作主要的生成目标,而次要适应度函数应探索正交的支持场景。我们的结果还提供了进一步的证据,证明测试生成的未来方法应集中在获得更高的私有代码覆盖率以及更好的类依赖关系初始化和操纵上。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号