Author Login Editor-in-Chief Peer Review Editor Work Office Work

Computer Engineering ›› 2021, Vol. 47 ›› Issue (9): 191-196. doi: 10.19678/j.issn.1000-3428.0058936

• Computer Architecture and Software Technology • Previous Articles     Next Articles

Software Test Data Augmentation Method Based on Beetle Antennae Search

WANG Shuyan, HU Qianhua, SUN Jiaze   

  1. School of Computer Science and Technology, Xi'an University of Posts and Telecommunications, Xi'an 710121, China
  • Received:2020-07-14 Revised:2020-08-18 Published:2020-08-25

基于天牛须搜索的软件测试数据扩增方法

王曙燕, 胡乾花, 孙家泽   

  1. 西安邮电大学 计算机学院, 西安 710121
  • 作者简介:王曙燕(1964-),女,教授、博士,主研方向为软件测试、数据挖掘、智能信息处理;胡乾花(通信作者),硕士研究生;孙家泽,教授、博士。
  • 基金资助:
    陕西省重点研发计划项目“多线程程序并发故障智能测试关键技术研究”(2020GY-010);西安市科技计划项目“基于群体智能的多目标软件测试优化关键技术研究”(2019218114GXRC017CG018-GXYD17.10)。

Abstract: To bring the original test case set to the test requirements of an evolved program, a data augmentation method based on Beetle Antennae Search(BAS) algorithm is proposed for software test.Through the static analysis of the old and new versions of the program, the call graph and program execution information are extracted, and on this basis the to-be-tested target method set is obtained.By calculating the influence of the method that contains faulty data, an ordered target method set is acquired.According to the coverage information of the original test case set, some test cases are selected as the initial evolutionary population, and the fitness function is designed according to the branch distance and branch nesting depth.On this basis, the improved BAS algorithm is used to augment the test data of the ordered target method set.Experimental data show that the method improves the amplification efficiency by 49.91% compared with the Genetic Algorithm(GA)-based method, and 24.76% compared with the Particle Swarm Optimization(PSO) algorithm-based method.In addition, it reduces the cost of regression test.

Key words: regression test, test case augmentation, target method set, Beetle Antennae Search(BAS) algorithm, Metropolis criterion

摘要: 为使原测试用例集满足软件演化后新版本程序的测试需求,提出一种基于天牛须搜索算法的软件测试数据扩增方法。静态分析新旧版本程序,获取调用图和程序执行信息并得到所需测试的目标方法集,通过计算目标方法包含错误的影响度获得有序目标方法集。根据原测试用例集的覆盖信息选取部分测试用例作为初始的进化种群,基于分支距离和分支嵌套深度设计适应度函数,采用改进的天牛须搜索算法对有序目标方法集实现测试数据扩增。实验结果表明,与基于遗传算法和粒子群优化算法的测试数据扩增方法相比,该方法的测试数据扩增效率约平均提升49.91%和24.76%,且有效降低了回归测试成本。

关键词: 回归测试, 测试用例扩增, 目标方法集, 天牛须搜索算法, Metropolis准则

CLC Number: