Computer Engineering and Applications ›› 2017, Vol. 53 ›› Issue (12): 21-24.DOI: 10.3778/j.issn.1002-8331.1703-0070

Previous Articles     Next Articles

Equivalent mutant analysis in weak mutation testing

ZHANG Gongjie1,2, XIE Chunli2   

  1. 1.School of Computer Science and Technology, China University of Mining and Technology, Xuzhou, Jiangsu 221116, China
    2.School of Computer Science and Technology, Jiangsu Normal University, Xuzhou, Jiangsu 221116, China
  • Online:2017-06-15 Published:2017-07-04

等价变异体的弱变异分析方法

张功杰1,2,谢春丽2   

  1. 1.中国矿业大学 计算机科学与技术学院,江苏 徐州 221116
    2.江苏师范大学 计算机科学与技术学院,江苏 徐州 221116

Abstract: Mutation testing evaluates the quality of given test cases by executing mutants. However, a certain percentage of equivalent mutants increase the cost of mutation testing, as well as influence?the accuracy of evaluating the given test cases. A method is presented based on weak mutation analysis to accurately detect the equivalent mutants. In the method, conditional expressions, which can reflect the necessity of killing mutants, are combined by the statements before and after mutation, and the mutant branches are constructed from the combined conditional expressions. All mutant branches are integrated into the original program. The equivalent mutants are identified according to the satisfiability?of mutant branches. The proposed method is applied to six programs, and the results suggest that the proposed method can effectively identify the equivalent mutants.

Key words: mutation testing, weak mutation testing, equivalent mutant, mutant branch

摘要: 变异测试通过执行变异体评价给定测试用例集的质量。然而,一定比例的等价变异体,不仅增加变异测试成本,也影响测试用例评价结果的准确性。鉴于此,提出基于弱变异分析的方法,以有效检测等价变异体。所提方法将变异前后语句组合为条件语句,以反映杀死变异体的必要性条件,并构造变异分支;将所有变异分支集成到原程序中;通过分析变异分支的可满足性,判定等价变异体。将所提方法用于6个程序的实验,结果表明,所提方法能够有效检测等价变异体。

关键词: 变异测试, 弱变异测试, 等价变异体, 变异分支