计算机应用 ›› 2016, Vol. 36 ›› Issue (10): 2816-2821.DOI: 10.11772/j.issn.1001-9081.2016.10.2816

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

基于烟花爆炸优化算法的测试数据生成方法

丁蕊1,2, 董红斌2, 冯宪彬1, 赵佳华3   

  1. 1. 牡丹江师范学院 计算机与信息技术学院, 黑龙江 牡丹江 157000;
    2. 哈尔滨工程大学 计算机科学与技术学院, 哈尔滨 150001;
    3. 黑龙江工商学院 计算机科学与技术系, 哈尔滨 150025
  • 收稿日期:2016-04-29 发布日期:2016-10-10
  • 通讯作者: 丁蕊,E-mail:mdjdingrui@163.com
  • 作者简介:丁蕊(1977—),女,辽宁台安人,讲师,博士研究生,CCF会员,主要研究方向:软件测试、演化算法、基于搜索的软件工程;董红斌(1963—),男,河北唐山人,教授,博士,CCF会员,主要研究方向:自然计算、机器学习、多Agent系统、数据挖掘;冯宪彬(1972—),男,吉林榆树人,副教授,硕士,主要研究方向:基于搜索的软件工程、自然计算;赵佳华(1976—),女,讲师,硕士,主要研究方向:演化算法、软件测试。
  • 基金资助:
    国家自然科学基金资助项目(61472095,61272186,61573362);牡丹江师范学院博士科研启动基金资助项目(MNUB201414);牡丹江师范学院科学技术研究项目(QN201603,QY2014003)。

Testing data generation method based on fireworks explosion optimization algorithm

DING Rui1,2, DONG Hongbin2, FENG Xianbin1, ZHAO Jiahua3   

  1. 1. School of Computer and Information Technology, Mudanjiang Normal University, Mudanjiang Heilongjiang 157000, China;
    2. College of Computer Science and Technology, Harbin Engineering University, Harbin Heilongjiang 150001, China;
    3. Department of Computer Science and Technology, Heilongjiang College of Business and Technology, Harbin Heilongjiang 150025, China
  • Received:2016-04-29 Published:2016-10-10
  • Supported by:
    BackgroundThis work is partially supported by the National Natural Science Foundation of China (61472095, 61272186, 61573362), the Fundamental Research Foundation for Doctoral Program of Mudanjiang Normal University (MNUB201414), the Mudanjiang Normal University Research Foundation for Science and Technology (QN201603, QY2014003).

摘要: 针对面向路径覆盖的测试数据生成问题,提出基于烟花爆炸优化算法的测试数据生成方法。首先使用关键点路径表示法表示路径,由理论路径、易覆盖路径和不可行路径得出难覆盖路径,并记录难覆盖路径邻近的易覆盖路径及其测试数据。这些测试数据将作为部分初始烟花以利用其提供的启发信息,其余初始烟花则随机生成。接着根据个体的适应度值设计自适应策略的爆炸半径以提高收敛速度,对爆炸产生的越界火花则使用边界值测试的思想进行修正。与加了启发信息的自适应爆炸半径的烟花算法(NFEO算法)、烟花爆炸优化(FEO)算法、F-method、NF-method等七种基于优化的测试数据生成算法进行了仿真对比实验,实验结果表明:所提算法在测试数据生成时间和迭代次数上都最优。

关键词: 烟花爆炸优化算法, 覆盖测试, 难覆盖路径, 测试数据生成, 自适应参数

Abstract: Aiming at the problem of path coverage test data generation, a new test data generation method based on improved Fireworks Xxplosion Optimization (FXO) algorithm was proposed. First, key-point path method was used to represent the program paths, and the hard-covered paths were defined by the theoretical paths, easy-covered paths and infeasible paths; the easy-covered paths adjacent to the hard-covered paths and their testing data were recorded and used as part of the initial fireworks to improve convergence speed, and the remaining initial fireworks were created randomly. Then according to the individuals' fitness values, an adaptive blast radius was designed to improve convergence rate, and the thought of boundary value test was introduced to modify the border-crossing sparkles. Compared with other seven optimization algorithms that generate testing data, including fireworks explosion optimization with adaptive radius and heuristic information (NFEO), FEO, F-method, NF-method, etc, the simulation results show that the proposed algorithm has lower time complexity of calculating level, and better performance in convergence.

Key words: fireworks explosion optimization algorithm, coverage testing, hard-covered path, software testing data generation, adaptive parameter

中图分类号: