电子学报 ›› 2014, Vol. 42 ›› Issue (12): 2345-2351.DOI: 10.3969/j.issn.0372-2112.2014.12.002

• 学术论文 • 上一篇    下一篇

基于正交搜索的粒子群优化测试用例生成方法

王令赛, 姜淑娟, 张艳梅, 于巧   

  1. 中国矿业大学计算机科学与技术学院, 江苏徐州 221116
  • 收稿日期:2014-05-02 修回日期:2014-06-26 出版日期:2014-12-25
    • 通讯作者:
    • 姜淑娟
    • 作者简介:
    • 王令赛 女,1989年3月出生于河北清河.中国矿业大学研究生,主要研究领域为软件测试、测试数据生成. E-mail:wls_007@126.com
    • 基金资助:
    • 国家自然科学基金 (No.60970032); 江苏省"333"工程; 江苏省"青蓝工程"; 中央高校基本科研业务费专项资金资助 (No.2013NB17)

Test Case Generation Based on Orthogonal Exploration and Particle Swarm Optimization

WANG Ling-sai, JIANG Shu-juan, ZHANG Yan-mei, YU Qiao   

  1. School of Computer Science and Technology, China University of Mining and Technology, Xuzhou, Jiangsu 221116, China
  • Received:2014-05-02 Revised:2014-06-26 Online:2014-12-25 Published:2014-12-25
    • Supported by:
    • National Natural Science Foundation of China (No.60970032); 333 High-level Talents Cultivation Project in Jiangsu Province; Blue Project in Jiangsu Province; Supported by Fundamental Research Funds for the Central Universities (No.2013NB17)

摘要:

针对粒子群优化算法易出现早熟收敛的问题,本文提出一种基于正交搜索的粒子群优化测试用例生成方法.首先,利用奇异值分解来预测种群的进化方向,在其正交方向进行搜索,可避免已搜索过的区域,有助于跳出局部最优;然后,对粒子速度项进行改进,使其与正交方向保持一致,保证种群可持续受到正交方向的影响,有利于减少奇异值分解次数,降低时间消耗;最后,对每代最优个体进行局部搜索,以增强算法局部搜索能力.实验证明,本文方法在覆盖率、运行时间、进化代数等指标上均有优势.

关键词: 测试用例生成, 粒子群优化算法, 局部搜索, 奇异值分解

Abstract:

To solve the problem of premature convergence,this paper presents a method of generating test cases based on orthogonal exploration and particle swarm optimization.First,singular value decomposition is used to estimate the evolution direction and drives the population towards orthogonal direction,so that our method can avoid searching those traversed areas so far and jump out of local optimum.Then,we change the velocity so that it is able to be consistent with the orthogonal direction,and as a result,the population can be affected continually,which can decrease the frequency of singular value decomposition and reduce the time consumption.Finally,the local search is used for the best particle in each generation.The experimental results show that our method has advantages in coverage,running time,and the number of generations.

Key words: test case generation, particle swarm optimization, local search, singular value decomposition

中图分类号: