• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

J4 ›› 2012, Vol. 34 ›› Issue (1): 86-89.

• 论文 • 上一篇    下一篇

改进PSO算法在软件测试数据生成中的应用

时贵英   

  1. (东北石油大学计算机与信息技术学院,黑龙江 大庆 163318)
  • 收稿日期:2010-12-13 修回日期:2011-03-11 出版日期:2012-01-25 发布日期:2012-01-25

Application of an Improved Particle Swarm Optimization Algorithm in Software Test Data Generation

SHI Guiying   

  1. (School of Computer and Information Technology,Northeast Petroleum University,Daqing 163318,China)
  • Received:2010-12-13 Revised:2011-03-11 Online:2012-01-25 Published:2012-01-25

摘要:

软件测试是软件质量保证的重要手段,测试用例自动生成一直是被广泛研究的问题。本文在分析了遗传算法、粒子群算法和蚁群算法的优缺点后,在软件测试用例的自动生成过程中采用一种新改进的粒子群算法。该算法将蚁群算法的信息素机制引入到粒子群算法中,加大了粒子间的多样性,有效地克服了粒子群算法容易发生早熟停滞的缺陷。最后通过仿真实验证明了算法应用于软件测试的可行性和高效性。

关键词: 粒子群算法, 蚁群算法, 信息素机制, 软件测试

Abstract:

Software testing is an important means of software quality assurance,the automatic generation of test cases has been widely studied. By analyzing the advantages and disadvantages of the genetic algorithm, the particle swarm optimization algorithm and the ant colony algorithm,the paper proposes a new improved particle swarm algorithm in the automatic generation of test cases. The pheromone mechanism of the ant colony algorithm is introduced into the particle swarm algorithm, which can increase the diversity of particles and overcome the defect that PSO is easy to premature and stagnation. Finally the simulation experiment proves the feasibility and efficiency of the algorithm in software testing.

Key words: PSO;ACO;peromone mechanism;software testing