摘要
目前测试数据生成方法多数未考虑到面向对象软件的多态特性,无法运用生成的测试数据对程序的多态信息进行充分的测试。根据多态路径测试数据生成的要求,提出了一种应用模拟退火—粒子群优化(simula-ted annealing-particle swarm optimization,SA-PSO)混合算法在多态路径测试中生成测试数据的方法,并通过多态性实例对基本粒子群算法、遗传算法、PSO-GA(particle swarm optimization-genetic algorithm)和SA-PSO算法在相同条件下进行了比较,结果表明SA-PSO算法具有更强的搜索能力,可以更快地发现全局最优解,能更好地为包含多态信息的测试路径生成测试数据。
At the present,most methods of generating test data do not consider the polymorphism features of object-oriented software,which cannot use the test data to do sufficient testing for polymorphism information of the programs.According to the requirement of generating polymorphism path test data,this paper proposed a method which was used to generate test data in polymorphism path testing by using SA-PSO.In addition,some cases have been done to make comparisons among other optimization algorithms such as basic particle swarm algorithm,genetic algorithm and PSO-GA algorithm.Experiments show that SA-PSO can find out the global optimal solution more quickly with stronger search capabilities.It is proved that SA-PSO algorithm has better performance to generate test data for the test path with polymorphism information.
出处
《计算机应用研究》
CSCD
北大核心
2011年第8期3034-3036,共3页
Application Research of Computers
关键词
粒子群优化算法
模拟退火算法
多态
测试路径
测试数据
particle swarm optimization algorithm
simulated annealing algorithm
polymorphism
test path
test data