电子学报 ›› 2012, Vol. 40 ›› Issue (1): 103-107.DOI: 10.3969/j.issn.0372-2112.2012.01.017

• 学术论文 • 上一篇    下一篇

基于路径比较的变异测试方法

姚香娟1,2,3, 巩敦卫1,3   

  1. 1. 中国矿业大学信息与电气工程学院,江苏徐州 221116;2. 中国矿业大学理学院,江苏徐州221116;3. 武汉大学软件工程国家重点实验室,湖北武汉 430072
  • 收稿日期:2011-01-07 修回日期:2011-05-05 出版日期:2012-01-25 发布日期:2012-01-25

Mutation Testing Based on Comparison of Paths

YAO Xiang-juan1,2,3, GONG Dun-wei1,3   

  1. 1. School of Information and Electrical Engineering,China University of Mining and Technology,Xuzhou,Jiangsu 221116,China;2. College of Science,China University of Mining and Technology,Xuzhou,Jiangsu 221116,China;3. State Key Laboratory of Software Engineering,Wuhan University,Wuhan,Hubei 430072,China
  • Received:2011-01-07 Revised:2011-05-05 Online:2012-01-25 Published:2012-01-25

摘要: 提出基于路径比较的变异测试方法.首先,通过比较穿越路径判定变异体是否被杀死;然后,建立基于路径覆盖的变异测试数据生成模型,该模型把杀死变异体作为目标,把满足特定路径覆盖作为约束;最后,采用遗传算法求解该模型.将本文方法应用于典型被测程序,结果表明,该方法可以降低变异测试的难度,并提高测试数据的生成效率.

关键词: 变异测试, 路径比较, 测试数据, 遗传算法

Abstract: This study proposed a mutation testing method based on comparison of paths.First,whether a mutation is killed is determined by comparing the traversed paths;then,a model of test data generation for mutation testing based on path coverage is proposed.In the mathematic model,the objective is to kill the mutation and the constraint is to traverse the chosen path.Finally,we applied the proposed method to some typical programs.The experimental results show that the proposed method can not only reduce the difficulty of mutation testing,but also improve the efficiency of generating test data.

Key words: mutation testing, path comparison, test data, genetic algorithm

中图分类号: