Journal of Computer Applications ›› 2019, Vol. 39 ›› Issue (3): 845-850.DOI: 10.11772/j.issn.1001-9081.2018081692

Previous Articles     Next Articles

Test case generation method based on improved bacterial foraging optimization algorithm

WANG Shuyan, WANG Rui, SUN Jiaze   

  1. School of Computer Science and Technology, Xi'an University of Posts and Telecommunications, Xi'an Shaanxi 710121, China
  • Received:2018-08-15 Revised:2018-09-04 Online:2019-03-10 Published:2019-03-11
  • Supported by:

    This work is partially supported by the Industrial Science and Technology Research Project of Shaanxi Province (2018GY-014, 2017GY-092), the Innovation Funds for Graduates in Xi'an University of Posts and Telecommunications (CXJJ2017063).


王曙燕, 王瑞, 孙家泽   

  1. 西安邮电大学 计算机学院, 西安 710121
  • 通讯作者: 王曙燕
  • 作者简介:王曙燕(1964-),女,陕西西安人,教授,博士,主要研究方向:软件测试、数据挖掘、智能信息处理;王瑞(1995-),女,山西运城人,硕士研究生,主要研究方向:可信软件、软件测试、数据挖掘;孙家泽(1980-),男,陕西西安人,副教授,博士,主要研究方向:软件测试、数据挖掘、智能信息处理。
  • 基金资助:



Aiming at the low efficiency of test case automatic generation technology, an IMproved Bacterial Foraging Optimization Algorithm (IM-BFOA) was proposed with introduction of Knet map. Firstly, Kent map was used to increase the diversity of the initial population and global search of bacteria. Secondly, the step size of chemotaxis stage in the algorithm was adaptively designed to make it more rational in the process of bacterial chemotaxis. Finally, a fitness function was constructed according to the program under test to accelerate the optimization of test data. The experimental results show that compared with Genetic Algorithm (GA), Particle Swarm Optimization (PSO) algorithm and standard Bacterial Foraging Optimization Algorithm (BFOA), the proposed algorithm is the best in terms of iterations number and running time with the guarantee of coverage and has high efficiency of test case generation.

Key words: test case generation, Bacterial Foraging Optimization Algorithm (BFOA), Kent map, adaptive step size, fitness function



关键词: 测试用例生成, 细菌觅食算法, Kent映射, 自适应步长, 适应度函数

CLC Number: