电子学报2016,Vol.44Issue(9):2254-2261,8.DOI:10.3969/j.issn.0372-2112.2016.09.034
基于路径自动分割的测试数据生成方法
Test Data Generation Based on Automatic Division of Path
摘要
Abstract
In order to improve the efficiency of test data generation for path coverage,a method for generating test da-ta was proposed,which was based on automatic division of path and artificial fish-swarm (AFS)algorithm.Firstly,the rela-tions between variables and nodes,and between variables and paths,were analyzed.Based on the analysis an algorithm for automatic division of path was presented,which can automatically judge the impact of variables on sub-paths.Secondly,an improved AFS algorithm was developed based on Levy flying and conjugate gradient.By making use of the result of path di-vision and the improved AFS algorithm,a new method for searching test data was proposed.If there exist sub paths that the fish pass through in the process of using AFS to generate test data,the corresponding component of these fish were fixed,so that search space were reduced.Finally,the proposed method was applied to the test data generation of programs.It is shown that our method outperforms the related methods in running time,success rate and stability.关键词
软件测试/路径分割/测试数据/路径覆盖/人工鱼群算法Key words
software testing/path division/test data/path coverage/artificial fish-swarm algorithm分类
信息技术与安全科学引用本文复制引用
廖伟志..基于路径自动分割的测试数据生成方法[J].电子学报,2016,44(9):2254-2261,8.基金项目
国家自然科学基金(No.61163012);广西高校科研资助项目(No.2013ZD040);广西混杂计算与集成电路设计分析重点实验室开放基金课题 ()