摘要
为了有效提高满足路径覆盖的测试数据质量,提出一种利用相似路径间启发信息的引导测试数据生成策略。首先,对初始测试数据与路径节点间的覆盖情况进行分析,区分出难易覆盖路径;其次,设计了一种路径相似度的计算方法,分析得出路径相关启发信息,并将该启发信息用于遗传算法寻优过程中;然后,构造带有权重影响因子的适应度评价函数,结合保留精英个体思想,设计自适应遗传算子并定向引导个体交叉变异;最后,将该策略应用于多个基准程序和工业程序,并与Ahmed方法、多路径覆盖方法和EGA方法比较。仿真实验结果表明,该策略在运行时间、路径覆盖率和已有测试数据的利用率上均有优势。
In order to effectively improve the quality of the test data that satisfies the path coverage,a guided test data generation strategy based on heuristic information between similar paths is proposed.Firstly,the difficult coverage paths were distinguished by analyzing the coverage between the initial test data and the path nodes.Secondly,apath similarity calculation method was designed to get path-related heuristic information,and the heuristic information was used for genetic algorithm optimization.Thirdly,a fitness evaluation function with the weight impact factor was constructed.In combination with the individual idea of retaining elites,the adaptive genetic operator was design,and the individual crossvariation was guided directionally.Finally,this strategy was applied in multiple benchmarks and industrial processes,and compared with Ahmed method,multipath coverage method and EGA method.The simulation results showed that the strategy had great advantages in running time,path coverage and utilization of existing test data.
作者
包晓安
徐海霞
张娜
吴彪
钱俊彦
BAO Xiaoan;XU Haixia;ZHANG Na;WU Biao;QIAN Junyan(School of Information Science and Technology, Zhejiang Sci-Tech University, Hangzhou 310018, China;Graduate School of East Asian Studies, Yamaguchi University, Yamaguchi 753-8514, Japan;School of Computer Science and Engineering, Guilin University of Electronic Technology, Guilin 541004, China)
出处
《浙江理工大学学报(自然科学版)》
2019年第1期65-71,共7页
Journal of Zhejiang Sci-Tech University(Natural Sciences)
基金
国家自然科学基金项目(61502430,61562015)
广西自然科学重点基金项目(2015GXNSFDA139038)
浙江理工大学521人才培养计划项目
关键词
启发信息
遗传算法
动态引导
测试数据生成
heuristic information
genetic algorithm
dynamic guidance
test data generation
作者简介
包晓安(1973-),男,浙江东阳人,教授,硕士,主要从事软件测试、智能信息处理方面的研究;通信作者:张娜,E-mail: zhangna@zstu.edu.cn.