一句话:揭示变异得分与真实故障检测的相关性受测试套件大小混杂影响,控制后相关性很弱。
本文质疑文献中变异得分与真实故障检测强相关的结论,指出该相关性可能源于测试套件大小的混杂效应。作者在 CoreBench 与 Defects4J 上,以大型 C/Java 程序和真实故障为对象,将变异得分与测试套件大小作为自变量、真实故障检测作为因变量进行分析。控制测试套件大小后,变异得分与故障检测的相关性均变弱;两个自变量虽显著影响因变量,但整体预测力较低。按变异得分排序的测试套件比同规模随机测试套件检测更多故障,表明变异体可指导测试改进,但其与故障检测的相关性较弱。
Empirical validation of software testing studies is increasingly relying on mutants. This practice is motivated by the strong correlation between mutant scores and real fault detection that is reported in the literature. In contrast, our study shows that correlations are the results of the confounding effects of the test suite size. In particular, we investigate the relation between two independent variables, mutation score and test suite size, with one dependent variable the detection of (real) faults. We use two data sets, CoreBench and Defects4J, with large C and Java programs and real faults and provide evidence that all correlations between mutation scores and real fault detection are weak when controlling for test suite size. We also find that both independent variables significantly influence the dependent one, with significantly better fits, but overall with relative low prediction power. By measuring the fault detection capability of the top ranked, according to mutation score, test suites (opposed to randomly selected test suites of the same size), we find that achieving higher mutation scores improves significantly the fault detection. Taken together, our data suggest that mutants provide good guidance for improving the fault detection of test suites, but their correlation with fault detection are weak.