为数众多的变异体产生的高昂测试代价严重影响了变异测试技术在实际程序中的应用.为了大幅度减少弱变异测试中变异体的数量,提出基于统计占优分析的变异体约简方法.该方法首先利用变异前后的语句构造变异分支,并将所有变异分支集成到原程序中,形成新的被测程序;然后,通过统计测试用例对各个变异分支的覆盖信息,确定变异分支之间的占优关系;最后得到非被占优分支集,其对应的变异体就是约简后的变异体.将该方法用于8个程序的测试,结果表明:该方法能够约简平均90%的变异体,从而显著提高了变异测试的效率.
The high cost resulting from a large number of mutants hinders mutation testing in practical application. In order to greatly reduce mutants under weak mutation testing, a new approach to reducing mutants based on statistical dominance analysis is presented. In the proposed approach, mutant branches are first constructed by combining statements before and after mutation, and a new program is formed by integrating all mutant branches into the original program. Furthermore, the dominance relations among mutant branches in the new program are determined by statistical information of coverage after executing test cases. Finally, the non-dominated mutant branches are obtained corresponding to the mutants after reduction. The proposed approach is applied to test eight programs, and the experimental results demonstrate that it can reduce 90% mutants on average, therefore greatly improve the efficiency of mutation testing.