摘要
为了提高测试数据自动生成的效率,提出基于改进遗传算法的多路径测试数据生成方法.首先将定向变异算子引入遗传算法,根据当前最优解产生变异个体,使变异向有利的方向进行,在保持种群多样性的同时提高局部搜索能力;然后综合考虑执行路径与目标路径间的路径相似程度以及谓词分支距离,设计了个体适应度评价函数,以有效地区分个体的优劣程度.针对基准程序进行实验,验证了该方法相对于传统方法的优越性.
To improve the efficiency of automatic test data generation, the multi-path test data generation method based on improved genetic algorithm is proposed. Firstly, the directed mutation operator was introduced into the genetic algorithm. The mutant was created according to the current best individual. It made individuals mutate in a good direction. The population diversity is maintained and the local search ability is improved. Secondly, the similarity degree of execution path and target path, and predicate branch distance were considered. An individual fitness evaluation function was designed. It distinguishes good individuals and bad individuals effectively. Ex-perimental results on benchmarks show its superiority to the traditional methods.
出处
《计算机辅助设计与图形学学报》
EI
CSCD
北大核心
2015年第10期2008-2014,共7页
Journal of Computer-Aided Design & Computer Graphics
关键词
测试数据生成
多路径
遗传算法
定向变异
test data generation
multi-path
genetic algorithm
directed mutation