期刊文献+

一种结合数据流约束的变异测试用例生成方法

A Method Combined with Data Flow Constraint for Generating Mutation Test Cases
下载PDF
导出
摘要 变异测试是一种高效的软件测试方法。作为发现故障和发现测试用例缺陷的一种手段,测试用例生成方法至关重要。如果测试用例能有效地生成并获得较高的变异评分,则有助于变异测试的广泛应用。目前大部分变异测试用例生成方法都是通过分析控制流图,仅使用语句间的控制流约束指导用例的生成,而未考虑语句间数据流约束的影响。本文提出一种结合数据流约束的变异测试用例生成方法,首先,将控制流约束和数据流约束二者结合对适应度函数进行建模;其次,将该模型应用于遗传算法指导测试用例的进化和选择。实验表明,与HGA相比,本方法在生成同样规模的测试集时平均迭代次数减少了60.5%;并且生成的测试用例获得的变异评分比随机方法平均高出了27.9%,表现出了更优的错误检测能力。 Mutation testing is a powerful method of software testing. As a means of finding faults and unco-vering test suite defects, the method of test case generation is crucially important. If the test case can generate efficiently and achieve a higher mutation score, it has the potential to help mutation testing be widely adopted. At present, most of the mutation test case generation methods are based on the analysis of the control flow graph, using only the control flow constraint between the statements to guide the generation of test cases, without considering the influence of the data flow constraint among the statements. In this paper, a mutation test case generation method combined with data flow constraint is proposed. First, the control flow constraint and the data flow constraint were combined to model the fitness function;second, the model was used in genetic algorithms to guide the selection and evolution of the test cases. Experiments show that the average iteration number is reduced by 60.53% when generating the same scale test set compared to HGA, and the generated test cases get a 27.9% higher mutation score than random method, showing a better error detection ability.
出处 《软件工程与应用》 2018年第2期99-109,共11页 Software Engineering and Applications
基金 国家自然科学基金资助项目(11575138) 陕西省工业公关项目资助项目(2013K06-20) 中央高校基本科研业务费专项基金资助项目(XJJ2015122) 轨道交通工程信息化国家重点实验室开放课题项目(SKLK16-08)。
  • 相关文献

参考文献3

二级参考文献39

  • 1金虎,李志蜀,张磊,李宝林,李勇军.基于面向路径的遗传算法的测试用例自动生成[J].计算机工程,2007,33(3):21-23. 被引量:9
  • 2DeMillo R A, Lipton R J, Sayward F G. Hints on test data selection: Help for the practicing programmer [J]. IEEE Computer, 1978, 11(4): 34-41.
  • 3Hamlet F G. Testing programs with the aid of a compiler [J]. IEEE Trans on Software Engineerirlg, 1977, 3 (4): 279-290.
  • 4Korel B, Al-Yami A M. Assertion-oriented automated test data generation [C] //Proc of the 18th Int Conf on Software Engineering. Washington, DC: IEEE Computer Society, 1996 : 71-80.
  • 5Delamaro M E, Maidonado J C, Mathur A P. Interface rnutation: An approach for integration testing [J]. IEEE Trans on Software Engineering, 2001, 27(3): 228-247.
  • 6Shufang Lee, Bai Xiaoying, Chen Yinong. Automatic mutation testing and simulation on OWL-S specified Web services [C]//Proc of the 41st Annual Simulation Symposium (ANSS-41). Washington, DC: IEEE Computer Society, 2008:149-156.
  • 7Ferrari F C, Maldonado J C, Rashid A. Mutation testing for aspect-oriented programs[C] //Proc of the 1st Int Conf on Software Testing, Verification, and Validation. Washington, DC: IEEE Computer Society, 2008:52-61.
  • 8Ma Y S, Kwon Y R, Offutt J. Inter-class mutation operators for java [C] //Proc of the 13th Int Symp on Software Reliability Engineering (ISSRE 2002). Washington, DC: IEEE Computer Society, 2002:352-363.
  • 9Jon E. A survey on automatic test data generation [C/OL] J/ Proe of the 2nd Conf on Computer Science and Engineering. 1999: 21-28. [2009-05-01]. http://staff, unak. is/not/andy/ MScTestingMaintenan ee0607/Lectures/SurveyAutomaticTest DataGeneration. pdf.
  • 10DeMillo R A, Offutt A J. Constraint-based automatic test data generation [J]. IEEE Trans on Software Engineering, 1991, 17(9): 900-910.

共引文献24

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部