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