首页 | 本学科首页   官方微博 | 高级检索  
     

基于分支覆盖的回归测试路径选择
引用本文:吴川,巩敦卫,姚香娟. 基于分支覆盖的回归测试路径选择[J]. 软件学报, 2016, 27(4): 839-854
作者姓名:吴川  巩敦卫  姚香娟
作者单位:中国矿业大学 计算机科学与技术学院,江苏 徐州 221116,中国矿业大学 信息与电气工程学院,江苏 徐州 221116,中国矿业大学 理学院,江苏 徐州 221116
基金项目:国家自然科学基金(61375067, 61203304); 江苏省自然科学基金(BK2012566); 中央高校基本科研业务专项基金(2012QNA 41)
摘    要:回归测试是迭代式软件开发的重要环节,测试数据生成是回归测试的前提.传统的回归测试方法,从已有的测试数据中选择部分测试数据,并生成一些新的测试数据,以验证程序的正确性.但是,该方法容易生成冗余的测试数据,从而降低了回归测试的效率.研究了回归测试的分支覆盖问题,通过利用已有测试数据的路径覆盖信息,并选择一定个数的路径,以覆盖所有的目标分支.首先,以若干路径形成的集合作为决策变量,以路径最少、覆盖的分支最多以及包含的未覆盖路径最少为目标,建立路径选择问题的3目标优化模型;然后,采用遗传算法求解上述模型时,设计了基于目标重要性的个体评价策略;最后,基于已有的测试数据与选择的路径之间的覆盖关系,确定需要生成的测试数据.将所提方法应用于6个基准工业程序测试中,并与其他方法比较.实验结果表明,采用该方法选择的路径,能够覆盖更多的分支,需要生成的测试数据更少,回归测试消耗的时间更短.

关 键 词:回归测试  分支覆盖  路径选择  多目标优化  遗传算法
收稿时间:2015-09-15
修稿时间:2015-10-15

Selection of Paths for Regression Testing Based on Branch Coverage
WU Chuan,GONG Dun-Wei and YAO Xiang-Juan. Selection of Paths for Regression Testing Based on Branch Coverage[J]. Journal of Software, 2016, 27(4): 839-854
Authors:WU Chuan  GONG Dun-Wei  YAO Xiang-Juan
Affiliation:School of Computer Science and Technology, China University of Mining and Technology, Xuzhou 221116, China,School of Information and Electrical Engineering, China University of Mining and Technology, Xuzhou 221116, China and College of Science, China University of Mining and Technology, Xuzhou 221116, China
Abstract:Regression testing is an important part of the iterative software development, and test data generation is the premise of regression testing. Traditional regression testing methods select a part of test data from existing ones, and generate a number of new test data, so as to verify the correctness of a program. However, these methods are prone to generate redundant test data, reducing the efficiency of regression testing. This paper researches the problem of branch coverage for regression testing, makes full use of information that existing test data cover paths, and selects a number of paths, so as to cover all the target branches. First, taking a set consisting in several paths as the decision variable, the least number of paths, the largest number of covered branches, and the least number of uncovered paths as the objectives, a 3-objective optimization model for the problem of selecting paths is established. Then, a strategy of evaluating an individual based on the importance of an objective is designed when solving the above model using genetic algorithm. Finally, test data required to generate is determined according to the relation between existing test data and the selected paths. The proposed method is applied to test six benchmark and industrial programs, and compared with other regression testing methods. The experimental results show that paths selected by the proposed method can cover more branches, with fewer test data required to generate and less time consumption for regression testing.
Keywords:regression testing   branch coverage   path selection   multi-objective optimization   genetic algorithm
本文献已被 CNKI 等数据库收录!
点击此处可从《软件学报》浏览原始摘要信息
点击此处可从《软件学报》下载全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号