Mutation-Driven Generation of Unit Tests and Oracles

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

DOI:
10.1109/tse.2011.93
复制
发表时间:
2012-03-01
影响因子:
7.4
通讯作者:
Zeller, Andreas
Zeller, Andreas
中科院分区:
计算机科学1区
文献类型:
--
作者:
Fraser, Gordon;Zeller, Andreas

文献摘要

被引文献

相似文献

为了评估测试套件的质量,突变分析将人工缺陷(突变)植入程序中;未检测到的突变表明测试套件中存在弱点。我们提出了一个自动化的方法来生成单元测试,检测这些面向对象的类的突变。这样做有两个优点:首先,生成的测试套件是针对发现由变异操作符建模的缺陷而优化的,而不是覆盖代码。第二,由突变引起的状态变化诱导精确检测突变体的神谕。在10个开源库上进行评估后,我们的mu TEST原型生成的测试套件比原始手动编写的测试套件发现了更多的种子缺陷。
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 mu TEST prototype generates test suites that find significantly more seeded defects than the original manually written test suites.