期刊文献+

基于统计分析的弱变异测试可执行路径生成 被引量:2

Feasible Path Generation of Weak Mutation Testing Based on Statistical Analysis
下载PDF
导出
摘要 变异测试是一种面向缺陷的软件测试技术,然而高昂的测试代价,影响了其在实际程序测试的应用.Papadakis等人将某一程序的弱变异测试问题,转化为另一程序的变异语句真分支覆盖问题,以期采用已有的分支覆盖方法,生成变异测试数据.但是,上述方法使得转化后程序包含大量的变异分支,增加了分支覆盖测试数据生成的难度.如果采用合适的方法,约简转化后程序中包含的变异分支,并依所属的路径,对约简之后的变异分支分组,那么,将能够利用已有的路径覆盖测试方法,生成高质量的变异测试数据,从而提高弱变异测试的效率.但是,如何基于某一程序和变异体,生成可执行路径,至今缺乏有效的方法.鉴于此,文中通过考察变异语句真分支之间的相关性,提出了一种用于弱变异测试的可执行路径生成方法,使得覆盖这些路径的测试数据,能够杀死所有的变异体.该方法首先考察变异语句真分支之间的占优关系,约简被占优的变异分支,从而减少变异分支的数量;然后,将非被占优的变异分支插入到该程序,转化为另一被测程序,并基于转化之后的程序,考察同一语句形成的多个变异分支的相关性;通过组合相关变异分支,形成新的变异语句真分支;接着,利用被测语句与新变异语句真分支的相关性,生成包含新变异语句真分支和被测语句的可执行子路径;最后,采用统计分析,基于子路径之间的执行关系,构建并约简相关矩阵,将相关的子路径组合,生成一条或多条可执行路径.将所提方法应用于9个基准和工业程序测试中,并与传统方法进行了比较.实验结果表明,所提方法生成了为数较少的可执行路径,且运行时间短;更重要的是,这些可执行路径能够覆盖所有的变异分支.此外,所提方法涉及的样本容量,对生成的可执行路径数有一定的影响,但对程序的运行时间影响较小. Mutation testing is a fault-based testing technique.The high cost,however,limits its widespread applications in practical testing.Papadakis et al.transformed the problem of weak mutation testing of a program into that of covering the true branches of mutant statements of another program,with the purpose of generating mutation test data by using previous methods of branch coverage.The converted program contains,however,agreat number of mutant branches by using the above approach,thus having a difficulty in generating test data that cover these branches.If appropriate methods are employed to reduce the mutant branches in the convertedprogram,and the reduced mutant branches are grouped according to the paths to which they belong,mutation test data with high quality will be generated by using previous methods of path coverage,hence improving the efficiency of weak mutation testing.Effective methods for generating feasible paths based on a program and its mutants are,however,of absence up to date.In view of this,this paper proposes an approach to generate feasible paths for weak mutation testing by considering the correlation of the true branches of mutant statements,with the purpose of killing all mutants by test data that cover all these feasible paths.To fulfill this task,the dominance relation of the true branches of mutant statements is first determined and employed to reduce the dominated true branches.Following that the non-dominated branches of mutant statements are instrumented into the program to form another program.The true branches of mutant statements that are generated by mutating the same statement are transformed into a new one based on their correlation.Then feasible sub-paths that contain these new branches and the original statement are produced based on the correlation among the original statement and the new branches.Finally,a correlation matrix is generated and reduced based on the execution of these sub-paths using statistical analysis,and one or more feasible paths that contain all these feasible sub-paths are obtained based the correlation matrix.The proposed method is applied to nine benchmarks or industrial programs,and compared with traditional algorithms.Our experimental results demonstrate that the proposed method can generate a small number of paths which cover all the mutant branches,with less time in executing the program.In addition,the sampling size involved in the proposed method has an influence on the number of feasible paths to some degree,whereas slightly impacts time in executing the program.
出处 《计算机学报》 EI CSCD 北大核心 2016年第11期2355-2371,共17页 Chinese Journal of Computers
基金 国家"九七三"重点基础研究发展规划项目基金(2014CB046306-2) 国家自然科学基金(61375067 61203304 61573362)资助~~
关键词 变异测试 弱变异测试 变异分支 路径覆盖 可执行路径 mutation testing weak mutation testing mutant branch path coverage feasible path
  • 相关文献

参考文献8

二级参考文献214

  • 1单锦辉,姜瑛,孙萍.软件测试研究进展[J].北京大学学报(自然科学版),2005,41(1):134-145. 被引量:135
  • 2姜瑛,辛国茂,单锦辉,张路,谢冰,杨芙清.一种Web服务的测试数据自动生成方法[J].计算机学报,2005,28(4):568-577. 被引量:49
  • 3荀鹏程,赵杨,易洪刚,柏建岭,于浩,陈峰.Permutation Test在假设检验中的应用[J].数理统计与管理,2006,25(5):616-621. 被引量:38
  • 4DeMillo 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.
  • 5Hamlet F G. Testing programs with the aid of a compiler [J]. IEEE Trans on Software Engineerirlg, 1977, 3 (4): 279-290.
  • 6Korel 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.
  • 7Delamaro 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.
  • 8Shufang 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.
  • 9Ferrari 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.
  • 10Ma 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.

共引文献89

同被引文献1

引证文献2

二级引证文献2

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

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