Skip to main content
QUICK REVIEW

[论文解读] Selecting Fault Revealing Mutants

Thierry Titcheu Chekam, Mike Papadakis|arXiv (Cornell University)|Mar 21, 2018
Software Testing and Debugging Techniques参考文献 7被引用 5
一句话总结

该论文提出 FaRM,一种机器学习方法,通过静态程序特征(如控制流结构、代码复杂度和数据依赖性)在执行任何测试之前选择并优先处理可揭示故障的变异体。FaRM 在揭示真实故障方面优于随机选择、选择性变异和缺陷预测方法,故障揭示率提高 23% 至 34%,显著提升了变异测试的效率与效果,且运行时开销极低。

ABSTRACT

Mutant selection refers to the problem of choosing, among a large number of mutants, the (few) ones that should be used by the testers. In view of this, we investigate the problem of selecting the fault revealing mutants, i.e., the mutants that are most likely to be killable and lead to test cases that uncover unknown program faults. We formulate two variants of this problem: the fault revealing mutant selection and the fault revealing mutant prioritization. We argue and show that these problems can be tackled through a set of 'static' program features and propose a machine learning approach, named FaRM, that learns to select and rank killable and fault revealing mutants. Experimental results involving 1,692 real faults show the practical benefits of our approach in both examined problems. Our results show that FaRM achieves a good trade-off between application cost and effectiveness (measured in terms of faults revealed). We also show that FaRM outperforms all the existing mutant selection methods, i.e., the random mutant sampling, the selective mutation and defect prediction (mutating the code areas pointed by defect prediction). In particular, our results show that with respect to mutant selection, our approach reveals 23% to 34% more faults than any of the baseline methods, while, with respect to mutant prioritization, it achieves higher average percentage of revealed faults with a median difference between 4% and 9% (from the random mutant orderings).

研究动机与目标

  • 解决因生成大量变异体而引发的变异测试可扩展性瓶颈问题。
  • 在测试执行前识别并优先处理最有可能揭示真实未知程序故障的变异体——即所谓的“故障揭示型”变异体。
  • 开发一种轻量级的静态分析方法,避免依赖测试套件或变异体执行进行初始选择。
  • 通过利用与可杀死性及故障揭示性相关的程序特征,结合机器学习提升变异体选择与优先级排序效果。
  • 提供一种实用且可扩展的解决方案,减少人工工作量,并在实际软件测试中提升故障检测能力。

提出的方法

  • FaRM 使用一组静态程序特征,包括控制流图中的变异位置、代码复杂度度量以及控制/数据依赖性,来表征变异体。
  • 该方法应用监督机器学习分类技术,将变异体分类为可能可杀死或等价的类型,并判断其可能揭示真实故障的可能性。
  • 特征从源代码和变异体表示中提取,无需执行任何测试用例或变异体。
  • 模型基于先前测试过的软件项目或先前版本的历史数据进行训练,支持迁移学习应用于新系统。
  • 在变异体优先级排序方面,FaRM 根据预测的故障揭示潜力对变异体进行排序,使测试人员可优先关注高价值变异体。
  • 通过在 1,692 个真实故障和 45 个有缺陷的程序版本上进行 10 折交叉验证,评估性能。

实验结果

研究问题

  • RQ1静态程序特征能否有效预测哪些变异体最可能被杀死并揭示真实故障?
  • RQ2FaRM 在揭示真实故障方面,其变异体选择性能与随机选择、选择性变异和基于缺陷预测的方法相比如何?
  • RQ3FaRM 在保持或提升故障检测率的同时,能在多大程度上减少需要分析的变异体数量?
  • RQ4当测试执行预算有限时,FaRM 是否能以更少的测试用例实现更高的故障揭示效率?
  • RQ5FaRM 在不同软件系统和故障类型之间是否具备泛化能力,即使在使用无关项目训练的情况下?

主要发现

  • 与基线方法相比,FaRM 揭示的真实故障数量比随机变异体采样、选择性变异和基于缺陷预测的变异方法高出 23% 至 34%。
  • 在变异体优先级排序方面,与随机变异体排序相比,FaRM 在故障揭示率上实现了 4% 至 9% 的中位数提升。
  • 在所有基线方法中,FaRM 在变异体选择和优先级排序任务中均表现出统计显著的改进。
  • 通过在 1,692 个真实故障和 45 个有缺陷的程序版本上进行 10 折交叉验证,验证了 FaRM 在多样化软件系统中的稳健性能。
  • 仅使用静态特征(无需测试执行或动态分析)使 FaRM 能够在测试流程早期应用,从而降低整体成本。
  • 本研究证明,仅通过静态代码属性即可有效预测故障揭示型变异体,支持了在执行前进行变异体选择中应用机器学习的可行性。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。