Covering and Uncovering Equivalent Mutants

Covering and Uncovering Equivalent Mutants
复制标题

DOI:
10.1002/stvr.1473
复制
发表时间:
2013-08
期刊:
Software Testing
影响因子:
--
通讯作者:
David Schuler;A. Zeller
David Schuler;A. Zeller
中科院分区:
其他
文献类型:
--
作者:
David Schuler;A. Zeller

文献摘要

被引文献

相似文献

突变测试通过在程序中植入人工缺陷(突变)来测量测试套件的充分性。如果一个测试套件未能检测到一个突变,它也可能无法检测到真实的缺陷,因此应该改进。然而,也有保持程序语义不变的变化,因此不能被任何测试套件检测到。这种等同突变体必须人工剔除,这是一项繁琐的工作。在本文中,我们研究了覆盖率的变化是否可以用于检测非等效突变体:如果突变体改变了运行的覆盖率,那么它更有可能是非等效的。在7个Java程序的140个人工分类的突变样本中,我们发现:(i)问题严重,而且容易被忽视--大约45%的未检测到的突变体被证明是等价的;(ii)人工分类需要时间--每个突变大约15分钟;(iii)覆盖率是识别等价突变体的一种简单、高效和有效的手段--分类准确率为75%,召回率为56%;以及(iv)作为等价检测器的覆盖上级现有技术,特别是动态不变量的违反。我们的探测器已作为开源JAVALANCHE框架的一部分发布;数据集可公开用于复制和扩展实验。版权所有© 2012约翰威利父子有限公司.
Mutation testing measures the adequacy of a test suite by seeding artificial defects (mutations) into a program. If a test suite fails to detect a mutation, it may also fail to detect real defects—and hence should be improved. However, there are also mutations that keep the program semantics unchanged and thus cannot be detected by any test suite. Such equivalent mutants must be weeded out manually, which is a tedious task. In this paper, we examine whether changes in coverage can be used to detect non‐equivalent mutants: If a mutant changes the coverage of a run, it is more likely to be non‐equivalent. In a sample of 140 manually classified mutations of seven Java programs with 5000 to 100 000 lines of code, we found that (i) the problem is serious and widespread—about 45% of all undetected mutants turned out to be equivalent; (ii) manual classification takes time—about 15 min per mutation; (iii) coverage is a simple, efficient and effective means to identify equivalent mutants—with a classification precision of 75% and a recall of 56%; and (iv) coverage as an equivalence detector is superior to the state of the art, in particular violations of dynamic invariants. Our detectors have been released as part of the open‐source JAVALANCHE framework; the data set is publicly available for replication and extension of experiments. Copyright © 2012 John Wiley & Sons, Ltd.