摘要
针对数量庞大的变异体导致高昂变异测试代价的问题,提出一种基于程序依赖关系的变异体生成(PDMG)策略,选择满足一定约束条件的变异实施对象用于变异体生成。首先,基于数据依赖和控制依赖生成程序依赖图;其次,基于变异对象选择策略和程序依赖图选择被依赖语句作为变异对象;最后,对选择的变异对象注入变异算子生成变异体。将所提策略用于8个基准测试程序的变异测试。实验结果表明,与随机选择(RS)和变异算子选择(MOS)策略相比,PDMG策略在不降低变异测试有效性的前提下,平均减少了52.20%的变异体,提高了变异测试的执行效率。
Aiming at the problem of large numbers of mutants leading to high mutation testing cost,a Program Dependency based Mutant Generation(PDMG)strategy was proposed to select the mutation implementation objects satisfying certain constraint conditions for mutation generation.Firstly,program dependency graphs were generated based on data dependencies and control dependencies.Then,based on the mutation object selection strategy and program dependency graphs,the dependency statements were selected as mutation objects.Finally,the mutation operator was injected to the selected mutation objects in order to generate mutants.The proposed method was applied to mutation testing of 8 benchmark test programs.Experimental results show that compared with Random Selection(RS)and Mutation Operator Selection(MOS)strategies,PDMG strategy can reduce the mutants by 52.20%on average,improving the execution efficiency of mutation testing without reducing the effectiveness of mutation testing.
作者
田甜
邵阳阳
王苗苗
杨欢
TIAN Tian;SHAO Yangyang;WANG Miaomiao;YANG Huan(School of Computer Science and Technology,Shandong Jianzhu University,Jinan Shandong 250101,China)
出处
《计算机应用》
CSCD
北大核心
2024年第9期2863-2870,共8页
journal of Computer Applications
基金
山东省自然科学基金资助项目(ZR2020MF084)。
关键词
变异测试
数据依赖
控制依赖
变异对象
变异体约减
mutation testing
data dependence
control dependence
mutation object
mutant reduction