• 论文 •    

多路径粒子群优化自动测试用例生成算法

聂鹏,耿技,秦志光   

  1. 1.电子科技大学 计算机科学与工程学院,四川成都611731;2.江西财经大学 现代教育技术中心,江西南昌330013
  • 出版日期:2012-01-15 发布日期:2012-01-25

Multi-path oriented particle swarm optimization automatic test case generation algorithm

NIE Peng, GENG Ji, QIN Zhi-guang   

  1. 1.School of Computer Science and Engineering, University of Electronic Science and Technology of China, Chengdu 611731, China;2.Morden Education Technology Center,Jiangxi University of Finance and Economics, Nanchang 330013, China
  • Online:2012-01-15 Published:2012-01-25

摘要: 从计算资源优化、多路径适应度评价和测试路径间信息交换三个方面,对多路径粒子群优化测试用例自动生成的一般方法进行了分析。针对软件结构性测试多路径粒子群优化多路径覆盖中存在的问题,提出多路径粒子群优化自动测试用例生成算法。定义了多路径适应度函数,以解决多路径环境下的测试用例适应度测量问题;提出适应度决策矩阵,使测试用例可以在待测路径间交换信息和优化计算资源,并引导测试种群实现对多路径的覆盖。实验表明,所提算法节约了多路径粒子群优化多路径测试用例生成的计算资源,提高了算法的路径覆盖率。

关键词: 软件测试, 测试用例生成, 多路径覆盖, 多路径粒子群优化, 算法

Abstract: The general method of multi-path Particle Swarm Optimization (PSO) test case generation algorithm was analyzed from the perspectives of the computing resource optimization, the multi-path fitness evaluation, and the information sharing among the testing paths. To deal with the problems existing in PSO multi-path covering optimization on software testing, Multi-Path oriented PSO automatic test case generation algorithm (MPPSO) was proposed. In MPPSO, the multi-path fitness function was defined to solve the test case fitness on the multi-path environment and the fitness decision matrix was proposed to make the test case optimize computing resource and exchange information between test paths. The example results showed that MPPSO reduced the resource consumption in computing and improved the multipath coverage.

Key words: software testing, test case generation, multi-path coverage, multi-path oriented particle swarm optimization, algorithms

中图分类号: