Assessment of class mutation operators for C++ with the MuCPP mutation system

Assessment of class mutation operators for C++ with the MuCPP mutation system
复制标题

使用 MuCPP 突变系统评估 C 的类突变算子

DOI:
10.1016/j.infsof.2016.07.002
复制
发表时间:
2017
期刊:
Inf. Softw. Technol.
影响因子:
--
通讯作者:
J. Domínguez
J. Domínguez
中科院分区:
--
文献类型:
--
作者:
Pedro Delgado;I. Medina;F. Palomo;A. García;J. Domínguez

文献摘要

被引文献

相似文献

内容:变异测试主要分析了涉及主流语言中常见的结构化编程构造的传统变异运算符,但类级别的变异尚未得到相同程度的评估。这一事实在C++中值得注意,尽管它是最相关的语言之一,包括面向对象的功能。目的:本文提供了一个完整的评估类运算符的C++编程语言。MuCPP,一个新的系统,致力于突变测试的应用,这门语言,是为此而开发的。这个变异系统以一种健壮的方式实现了类变异操作符,处理了语言固有的复杂性。方法:MuCPP通过使用Clang API遍历每个翻译单元的抽象语法树来生成突变体,并将突变体存储为Git版本控制系统中的分支。该工具能够检测重复的突变体,避免系统头文件,并驱动编译过程。然后,MuCPP是用来进行实验与几个开源的C++程序。结果如下:在本文中列出的改进规则,以减少非生产性类突变体的技术的计算成本有显着的影响。我们还计算了类算子产生的突变体的数量和分布,它产生的突变体比传统的同类少得多。结论:我们表明,伴随这些程序的测试不能检测到故障相关的特定面向对象的功能的C++。为了增加突变分数,我们创建了新的测试场景来杀死所有应用程序中幸存的类突变体。结果证实,虽然仍然需要传统的变异操作符,类操作符可以补充它们,并帮助测试人员进一步改善测试套件。
Context: Mutation testing has been mainly analyzed regarding traditional mutation operators involving structured programming constructs common in mainstream languages, but mutations at the class level have not been assessed to the same extent. This fact is noteworthy in the case of C++, despite being one of the most relevant languages including object-oriented features. Objective: This paper provides a complete evaluation of class operators for the C++ programming language. MuCPP, a new system devoted to the application of mutation testing to this language, was developed to this end. This mutation system implements class mutation operators in a robust way, dealing with the inherent complexity of the language. Method: MuCPP generates the mutants by traversing the abstract syntax tree of each translation unit with the Clang API, and stores mutants as branches in the Git version control system. The tool is able to detect duplicate mutants, avoid system headers, and drive the compilation process. Then, MuCPP is used to conduct experiments with several open-source C++ programs. Results: The improvement rules listed in this paper to reduce unproductive class mutants have a significant impact in the computational cost of the technique. We also calculate the quantity and distribution of mutants generated with class operators, which generate far fewer mutants than their traditional counterparts. Conclusions: We show that the tests accompanying these programs cannot detect faults related to particular object-oriented features of C++. In order to increase the mutation score, we create new test scenarios to kill the surviving class mutants for all the applications. The results confirm that, while traditional mutation operators are still needed, class operators can complement them and help testers further improve the test suite.