Mutation-Driven Generation of Unit Tests and Oracles

Mutation-Driven Generation of Unit Tests and Oracles
复制标题

DOI:
10.1145/1831708.1831728
复制
发表时间:
2010-07
影响因子:
7.4
通讯作者:
G. Fraser;A. Zeller
G. Fraser;A. Zeller
中科院分区:
计算机科学1区
文献类型:
--
作者:
G. Fraser;A. Zeller

文献摘要

被引文献

相似文献

为了评估测试套件的质量,突变分析将人为缺陷(突变)植入程序中;未检测到的突变表明测试套件中存在弱点。我们提出了一种自动化方法来生成单元测试,以检测面向对象类的这些突变。这有两个优点:首先,生成的测试套件经过优化,旨在发现由变异运算符建模的缺陷,而不是覆盖代码。其次,突变引起的状态变化会引发精确检测突变体的神谕。我们的 μtest 原型对 10 个开源库进行了评估,生成的测试套件比原始手动编写的测试套件发现了更多的潜在缺陷。
To assess the quality of test suites, mutation analysis seeds artificial defects (mutations) into programs; a nondetected mutation indicates a weakness in the test suite. We present an automated approach to generate unit tests that detect these mutations for object-oriented classes. This has two advantages: First, the resulting test suite is optimized toward finding defects modeled by mutation operators rather than covering code. Second, the state change caused by mutations induces oracles that precisely detect the mutants. Evaluated on 10 open source libraries, our μtest prototype generates test suites that find significantly more seeded defects than the original manually written test suites.