计算机应用 ›› 2013, Vol. 33 ›› Issue (04): 1139-1141.DOI: 10.3724/SP.J.1087.2013.01139

• 计算机软件技术 • 上一篇    下一篇

基于改进鱼群算法的路径测试数据生成

王培崇1,2,钱旭2   

  1. 1. 石家庄经济学院 信息工程学院,石家庄 050031
    2. 中国矿业大学 机电与信息工程学院,北京 100083
  • 收稿日期:2012-10-11 修回日期:2012-12-03 出版日期:2013-04-01 发布日期:2013-04-23
  • 通讯作者: 王培崇
  • 作者简介:王培崇(1973-),男,河北辛集人,副教授,博士,主要研究方向:智能信息处理、软件质量保证;钱旭(1962-),男,江苏南京人,教授,博士生导师,博士,主要研究方向:智能信息处理。
  • 基金资助:

    教育部高校博士点建设基金资助项目(20110023110002);石家庄经济学院博士科研基金资助项目(2010)

Path test data generation based on improved artificial fish swarm algorithm

WANG Peichong1,2,QIAN Xu2   

  1. 1. School of Information Engineering, Shijiazhuang University of Economics, Shijiazhuang Hebei 050031, China
    2. School of Mechanical Electronic and Information Engineering, China University of Mining and Technology, Beijing 100083, China
  • Received:2012-10-11 Revised:2012-12-03 Online:2013-04-23 Published:2013-04-01
  • Contact: WANG Peichong

摘要: 针对自动化软件测试中测试数据自动化生成的问题,提出了一种基于人工鱼群算法的解空间搜索方案。为了提高人工鱼群算法的求解能力,在鱼群算法中引入混沌搜索机制。人工鱼群算法在每次迭代之后,将针对当前全局最优解进行局部混沌搜索,同时淘汰掉部分劣质个体;随后,根据种群的最佳个体收缩解空间搜索区域,并在该空间内随机产生部分新个体。最后,通过在两种三角形判定程序上的实验证明,该算法收敛速度快,求解精度高。

关键词: 先进计算, 人工鱼群算法, 混沌搜索, 软件测试, 数据生成

Abstract: To solve the path test data generation automatically in software testing, a new scheme on searching solution space based on Artificial Fish Swarm (AFS) algorithm was proposed. To improve the ability of original AFS, chaotic searching was introduced to reform AFS' local searching ability and precision of solution. Once AFS finished an iteration process, chaos algorithm was executed with global best solution. At the same time, some partial individuals with bad state were washed out. Then, according to the optimization individual contracting the searching space, some new individuals were generated randomly. Two kinds of triangle program were tested and the results show that the improved AFS has faster convergence and higher calculation accuracy.

Key words: advanced computation, Artificial Fish Swarm Algorithm (AFSA), chaotic searching, software testing, data generating