基于统计分析的弱变异测试可执行路径生成
发布时间:2018-10-20 07:33
【摘要】:变异测试是一种面向缺陷的软件测试技术,然而高昂的测试代价,影响了其在实际程序测试的应用.Papadakis等人将某一程序的弱变异测试问题,转化为另一程序的变异语句真分支覆盖问题,以期采用已有的分支覆盖方法,生成变异测试数据.但是,上述方法使得转化后程序包含大量的变异分支,增加了分支覆盖测试数据生成的难度.如果采用合适的方法,约简转化后程序中包含的变异分支,并依所属的路径,对约简之后的变异分支分组,那么,将能够利用已有的路径覆盖测试方法,生成高质量的变异测试数据,从而提高弱变异测试的效率.但是,如何基于某一程序和变异体,生成可执行路径,至今缺乏有效的方法.鉴于此,文中通过考察变异语句真分支之间的相关性,提出了一种用于弱变异测试的可执行路径生成方法,使得覆盖这些路径的测试数据,能够杀死所有的变异体.该方法首先考察变异语句真分支之间的占优关系,约简被占优的变异分支,从而减少变异分支的数量;然后,将非被占优的变异分支插入到该程序,转化为另一被测程序,并基于转化之后的程序,考察同一语句形成的多个变异分支的相关性;通过组合相关变异分支,形成新的变异语句真分支;接着,利用被测语句与新变异语句真分支的相关性,生成包含新变异语句真分支和被测语句的可执行子路径;最后,采用统计分析,基于子路径之间的执行关系,构建并约简相关矩阵,将相关的子路径组合,生成一条或多条可执行路径.将所提方法应用于9个基准和工业程序测试中,并与传统方法进行了比较.实验结果表明,所提方法生成了为数较少的可执行路径,且运行时间短;更重要的是,这些可执行路径能够覆盖所有的变异分支.此外,所提方法涉及的样本容量,对生成的可执行路径数有一定的影响,但对程序的运行时间影响较小.
[Abstract]:Mutation testing is a defect oriented software testing technology. However, the high cost of testing affects its application in actual program testing. Papadakis et al. The problem of true branch coverage of variant statements transformed into another program is expected to generate variation test data by using existing branch coverage methods. However, the above method makes the transformed program contain a large number of variant branches, which makes it more difficult to generate branch coverage test data. If we use the appropriate method, the variant branches included in the transformed program are grouped according to the path to which they belong, then we will be able to use the existing path to cover the test methods. High quality variation test data are generated to improve the efficiency of weak mutation testing. However, there is no effective method to generate executable paths based on a program and variant. In view of this, an executable path generation method for weak mutation testing is proposed by investigating the correlation between the true branches of mutated statements, so that the test data covering these paths can kill all variants. The method first investigates the dominant relationship between the true branches of a variant statement, reduces the number of the variation branches, and then inserts the non-dominant variation branches into the program and converts them into another program. And based on the transformed program, we investigate the correlation of multiple variant branches formed by the same sentence; form a new true branch of a variant statement by combining the related variation branches; then, using the correlation between the tested statement and the true branch of the new variant statement, The executable subpaths including the true branch of the new variant statement and the sentence under test are generated. Finally, the correlation matrix is constructed and reduced by statistical analysis based on the execution relationship between the subpaths, and the related sub-paths are combined. Generates one or more executable paths. The proposed method is applied to 9 benchmarks and industrial process tests, and compared with the traditional method. The experimental results show that the proposed method generates fewer executable paths and shorter running time, and more importantly, these executable paths can cover all the variation branches. In addition, the sample size of the proposed method has a certain effect on the number of executable paths generated, but has little effect on the running time of the program.
【作者单位】: 中国矿业大学信息与电气工程学院;徐州工程学院信电工程学院;兰州理工大学电气工程与信息工程学院;中国矿业大学理学院;
【基金】:国家“九七三”重点基础研究发展规划项目基金(2014CB046306-2) 国家自然科学基金(61375067,61203304,61573362)资助~~
【分类号】:TP311.53
本文编号:2282478
[Abstract]:Mutation testing is a defect oriented software testing technology. However, the high cost of testing affects its application in actual program testing. Papadakis et al. The problem of true branch coverage of variant statements transformed into another program is expected to generate variation test data by using existing branch coverage methods. However, the above method makes the transformed program contain a large number of variant branches, which makes it more difficult to generate branch coverage test data. If we use the appropriate method, the variant branches included in the transformed program are grouped according to the path to which they belong, then we will be able to use the existing path to cover the test methods. High quality variation test data are generated to improve the efficiency of weak mutation testing. However, there is no effective method to generate executable paths based on a program and variant. In view of this, an executable path generation method for weak mutation testing is proposed by investigating the correlation between the true branches of mutated statements, so that the test data covering these paths can kill all variants. The method first investigates the dominant relationship between the true branches of a variant statement, reduces the number of the variation branches, and then inserts the non-dominant variation branches into the program and converts them into another program. And based on the transformed program, we investigate the correlation of multiple variant branches formed by the same sentence; form a new true branch of a variant statement by combining the related variation branches; then, using the correlation between the tested statement and the true branch of the new variant statement, The executable subpaths including the true branch of the new variant statement and the sentence under test are generated. Finally, the correlation matrix is constructed and reduced by statistical analysis based on the execution relationship between the subpaths, and the related sub-paths are combined. Generates one or more executable paths. The proposed method is applied to 9 benchmarks and industrial process tests, and compared with the traditional method. The experimental results show that the proposed method generates fewer executable paths and shorter running time, and more importantly, these executable paths can cover all the variation branches. In addition, the sample size of the proposed method has a certain effect on the number of executable paths generated, but has little effect on the running time of the program.
【作者单位】: 中国矿业大学信息与电气工程学院;徐州工程学院信电工程学院;兰州理工大学电气工程与信息工程学院;中国矿业大学理学院;
【基金】:国家“九七三”重点基础研究发展规划项目基金(2014CB046306-2) 国家自然科学基金(61375067,61203304,61573362)资助~~
【分类号】:TP311.53
【相似文献】
相关期刊论文 前9条
1 任刚;吴晶晶;谢志鹏;孙未未;;自组织网络有效的组合服务执行路径发现方法[J];计算机工程与应用;2010年01期
2 寇雪芹;;多诊断资源参与下的诊断任务执行路径规划[J];计算机测量与控制;2011年11期
3 孙光;刘钟理;;基于频繁执行路径扩展的软件胎记方法[J];计算机工程与应用;2012年36期
4 孟超;孙知信;刘三民;;基于云计算的病毒多执行路径[J];吉林大学学报(工学版);2013年03期
5 任开军;宋君强;肖侬;张卫民;;基于迭代Bargaining策略优化服务合成执行路径[J];国防科技大学学报;2009年01期
6 王爽;;远程协同故障诊断任务执行路径规划[J];计算机测量与控制;2011年08期
7 孙光;樊晓平;刘钟理;;扩展频繁执行路径上的n-gram软件胎记[J];信息网络安全;2013年02期
8 刘泓漫,郝忠孝;联合公式判定非循环执行路径[J];哈尔滨理工大学学报;2004年01期
9 ;[J];;年期
相关重要报纸文章 前2条
1 刘晓芬 粟伟 黎建军;桃源 打造世外仙境的执行路径[N];人民法院报;2013年
2 赵高潮 省政协委员、民进青岛市委副主委;限制权力是防腐廉政的基础[N];联合日报;2011年
相关硕士学位论文 前1条
1 姚艳玲;基于执行路径聚类的程序错误定位方法研究[D];大连海事大学;2013年
,本文编号:2282478
本文链接:https://www.wllwen.com/kejilunwen/ruanjiangongchenglunwen/2282478.html