摘要
针对如何选取检错能力优良蜕变关系的问题,提出一种基于差异度分析的蜕变关系选取方法。从程序结构出发,分析每条蜕变关系能达到的路径对,利用路径覆盖距离度量蜕变关系中路径对之间的差异度,对于输入为多元组的程序还须考虑蜕变关系中参数间差异对蜕变关系检错率的影响,得出每条蜕变关系差异度值。通过多个不同类型实验对该方法进行验证,实验结果表明,蜕变关系差异度值越大的蜕变关系检错能力越强,验证了该方法的正确性。
Based upon the question that how to select useful metamorphic relation,the method for the selection of useful metamorphic relations on the basis of differences analysis was proposed.In the beginning,the path couple of every relation based on program structure analysis was presented.Path coverage distance was used to evaluate the dissimilarities of path couples.As for programs with the multiple inputs,parameters differences were taken into consideration.As a result,the differences of every relation were demonstrated.Experiments were carried out to evaluate the rationality of this method.Experimental results show that the greater the differences of metamorphic relations,the greater the fault-detection effectiveness.Thus,the method proposed is correct.
引文
[1]Chen TY,Cheung SC,Yiu SM.Metamorphic testing:A new approach for generating next test cases[R].Hong Kong:Hong Kong University,1998.
[2]Upulee Kanewala,James M Bieman.Using machine leaning techniques to detect metamorphic relations for programs without test oracles[C]//Software Reliability Engineering,2013:1-10.
[3]Liu Huai,Liu Xuan,Chen TY.A new method for constructing metamorphic relations[C]//Quality Software,2012:59-68.
[4]Gagandeep,Gurdeepak Singh.An automated metamorphic testing technique for designing effective metamorphic relations[C]//Contemporary Computing,2012:152-163.
[5]Hui ZW,Huang S.A formal model for metamorphic relation[C]//Decomposition Software Engineering,2013:64-68.
[6]Mahmuda Asrafi,Liu Huai,Kuo Fei-Ching.On testing effictiveness of metamorphic relations:A case study[C]//5th International Conference on Secure Software Integration and Reliability Improvement,2011:147-157.
[7]Liu H,Kuo FC.How effectively does metamorphic testing alleviate the oracle problem[J].IEEE Transactions on Software Engineering,2014,40(1):4-22.
[8]DU Yuanzhu,HUANG Song,HUI Zhanwei,et al.Sufficiency condition in metamorphic testing based on mutation analysis[J].Journal of Computer Applications,2014,34(S1):280-283(in Chinese).[杜元柱,黄松,惠战伟,等.基于变异分析的蜕变测试充分性条件[J].计算机应用,2014,34(S1):280-283.]
[9]Chen TY,Huang DH,Tse TH,et al.Case studies on the selection of useful relations in metamorphic testing[C]//4th Ibero-American Symposium on Software Engineering and Knowledge Engineering,2004:569-583.
[10]DONG Guowei,NIE Changhai,XU Baowen,et al.Effectively metamorphic testing based on program path analysis[J].Chinese Journal of Computers,2009,32(3):1002-1013(in Chinese).[董国伟,聂长海,徐宝文,等.基于程序路径分析的有效蜕变测试[J].计算机学报,2009,32(3):1002-1013.]
[11]Cao Yuxiang,Zhou Zhiquan,Chen Tsongyueh.On the correlation between the effectiveness of metamorphic relations and dissimilarities of test case executions[C]//13th International Conference on Quality Software,2013:153-162.
[12]Mayer J,Guderlei R.An empirical study on the selection of good metamorphic relations[C]//30th Annual International Computer Software and Applications Conference,2006:475-484.
[13]Zhou ZQ.Using coverage information to guide test case selection in adaptive random testing[C]//IEEE Computer Software&Applications Conference Workshops,2010:208-213.
[14]Zhou ZQ,Sinaga A,Susilo W.On the fault-detection capabilities of adaptive random test case prioritization:Case studies with large test suites[C]//45th Annual Hawaii International Conference on Software Engineering,2001:339-348.
[15]WANG Rong,BEN Kerong.Research on basic criterion and strategy of constructing metamorphic relations[J].Computer Science,2013,39(1):115-119(in Chinese).[王瑢,贲可容.蜕变关系构造基本准则与策略研究[J].计算机科学,2013,39(1):115-119.]