测试用例生成是软件测试的重要环节,是软件确保的重要组成部分,其中启发性算法是近年来测试用例自动生成研究领域的热点.对启发性测试用例生成的新方法PSO进行了介绍和分析,详细讨论了PSO算法适应度函数、PSO算法早熟与局部最优、种群规模对PSO算法的影响以及PSO微优化问题,并将PSO与GA算法进行了对比分析.展望了Ps0测试用例生成算法的未来研究方向,指出PSO测试用例生成算法目前应重点解决测试用例规模优化、早熟抑制和参数优选等问题.
The automatic test case generation is a key phase of software testing and an important part ot software assurance. The study on the heuristic algorithms is an emerging area of the automatic test case generation in recent years. The new heuristic algorithm of PSO for the test case generation is reviewed and analyzed. Key issues on the PSO test case generation are discussed, including PSO fitness functions, PSO premature convergence and local optimum, swarm size impact, and parameter optimization. A contrastive analysis of PSO and GA in software testing is presented in detail. Finally, the future development of PSO test case generation algorithms is prospected including the test case swarm size optimization, the premature restraining, and the parameter optimization.