论文部分内容阅读
变异测试是一种面向缺陷的软件测试方法,分为一阶变异和高阶变异,其中高阶变异一直是变异测试的难点。本文在研究变异测试问题的基础上,提出一种基于遗传算法高阶变异测试的测试数据生成方法。该数据生成方法首先对原程序的某些原语句进行静态分析,基于分支关系,将具有无关性的原语句进行分类;然后对原语句实施变异,生成变异体;最后基于遗传算法生成语句覆盖的测试数据。实验结果表明,采用该种方法生成的测试数据针对性更强,避免了高阶变异测试的耦合效应。
Variation testing is a defect-oriented software testing method, which is divided into the first-order variation and the high-order variation. Among them, the high-order variation has been the difficulty of mutation testing. Based on the study of mutation testing, this paper presents a method of generating test data based on GA mutation testing. The data generation method first static analysis of some of the original statements of the original program, based on the branch relationship, will have irrelevance of the original phrase classification; then the original sentence to implement mutation, generate variants; Finally, based on genetic algorithm to generate statements covered Test Data. The experimental results show that the test data generated by this method is more targeted and avoids the coupling effect of higher-order mutation testing.