引用本文:丁蕊,董红斌,张岩,冯宪彬.基于关键点路径的快速测试用例自动生成方法.软件学报,2016,27(4):814-827
【打印本页】   【下载PDF全文】   查看/发表评论  【EndNote】   【RefMan】   【BibTex】
←前一篇|后一篇→ 过刊浏览    高级检索
本文已被:浏览 5719次   下载 8527 本文二维码信息
码上扫一扫!
分享到: 微信 更多
基于关键点路径的快速测试用例自动生成方法
丁蕊1,2, 董红斌1, 张岩2, 冯宪彬2
1.哈尔滨工程大学 计算机科学与技术学院, 黑龙江 哈尔滨 150001;2.牡丹江师范学院 计算机与信息技术学院, 黑龙江 牡丹江 157012
摘要:
测试数据的自动生成,是提高软件测试效率的重要手段.从软件测试工程实践的角度提出快速生成测试数据的完整模型,更有利于提高测试数据生成效率.为此:(1)提出关键点路径表示法,以得出待测程序的理论路径数,并快速确定已覆盖路径的邻近路径;(2)用随机生成的数据运行简化后的插装程序,得到部分测试数据;(3)将理论路径分成易覆盖路径、难覆盖路径和不可行路径;(4)根据已覆盖路径及其测试数据提供的信息,使用遗传算法生成难覆盖路径的测试数据.仿真实验结果表明了所提方法的有效性.
关键词:  关键点路径  软件测试数据生成模型  覆盖测试  启发式信息  遗传算法
DOI:10.13328/j.cnki.jos.004971
分类号:
基金项目:国家自然科学基金(61472095,61573362);黑龙江省教育厅智能教育与信息工程重点实验室开放基金;牡丹江师范学院科研基金(QN201603,QY2014003,MNUB201414,FD2014001,SY2014001)
Fast Automatic Generation Method for Software Testing Data Based on Key-Point Path
DING Rui1,2, DONG Hong-Bing1, ZHANG Yan2, FENG Xian-Bin2
1.College of Computer Science and Technology, Harbin Engineering University, Harbin 150001, China;2.School of Computer and Information Technology, Mudanjiang Normal University, Mudanjiang 157012, China
Abstract:
Automatic generation of testing data is an important means for improving the efficiency of software testing. Focusing on the engineering practice of software testing, a fast automatic method is proposed to improve the efficiency of testing data generation.(1) A key-point path expression method is proposed to calculate the number of theoretical paths, and find the covered paths' neighbors;(2) Brief instrumented program is executed to get some testing data by using the testing data generated from random algorithm;(3) The theoretical paths are divided into three parts:Easy-Cover paths, hard-cover paths and infeasible paths;(4) According to the information of covered paths and their testing data, the data of hard-cover paths will be generated by genetic algorithm. Simulation experimental results show that the proposed method is efficient.
Key words:  key-point path  software testing data generation method  coverage testing  heuristic information  genetic algorithm