paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Contextual Predictive Mutation Testing

上下文感知的预测式变异测试
FSE Proceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering2023匹配度 3/10 · 该论文将 BERT 应用于变异测试预测,属于机器学习辅助软件测试(动态分析),而非用户关注的静态分析、形式化验证、浮点程序分析或贝叶斯程序分析。虽然涉及 AI 与程序语言的交叉,但任务方向(测试)与用户核心研究画像偏差较大。引用 10 inbox
Kush Jain, Uri Alon, Alex Groce, Claire Le Goues
crossref: 2026-09-12dblp: 2026-09-12arxiv: 2026-09-12

AI 速览

一句话:提出 MutationBERT,联合编码源码变异与测试方法,更准地预测变异体是否被检出,节省验证时间。

变异测试通过人工注入缺陷并检查测试套件能否捕获来评估测试质量,但计算开销大,难以扩展到大系统。近期工作尝试用机器学习预测测试是否会检出合成缺陷,从而避免实际运行测试,然而现有预测式变异测试方法在随机采样的变异体-测试套件对上仍会误分类约33%的检出结果。本文提出 MutationBERT,其核心是在输入表示中同时编码源方法变异与测试方法,从而捕获关键上下文信息。作者验证了该输入表示以及将预测从测试矩阵级别提升到测试套件级别的聚合方法。实验表明,MutationBERT 在同项目与跨项目设置下均优于现有最优方法,在精确率、召回率和 F1 值上取得有意义的提升,并比先前方法节省33%用于检查/验证活变异体的时间。它不仅推进了预测式变异测试的技术水平,还具有实际应用价值:既节省开发者时间,也能发现先前方法难以检测的变异体。

问题
变异测试虽能评估测试套件质量,但计算代价高、难以扩展;已有预测式变异测试方法仍会误分类约33%的变异体-测试套件检出结果。
方法
提出 MutationBERT,在输入表示中同时编码源方法变异与测试方法以捕获上下文,并验证了该表示以及从测试矩阵级到测试套件级的预测聚合方法。
评估
在随机采样的变异体-测试套件对上,于同项目和跨项目设置中与现有最优方法比较精确率、召回率和 F1 值,并测量节省的活变异体验证时间及对难检测变异体的发现能力。
原文摘要(Abstract)

Mutation testing is a powerful technique for assessing and improving test suite quality that artificially introduces bugs and checks whether the test suites catch them. However, it is also computationally expensive and thus does not scale to large systems and projects. One promising recent approach to tackling this scalability problem uses machine learning to predict whether the tests will detect the synthetic bugs, without actually running those tests. However, existing predictive mutation testing approaches still misclassify 33% of detection outcomes on a randomly sampled set of mutant-test suite pairs. We introduce MutationBERT, an approach for predictive mutation testing that simultaneously encodes the source method mutation and test method, capturing key context in the input representation. Thanks to its higher precision, MutationBERT saves 33% of the time spent by a prior approach on checking/verifying live mutants. MutationBERT, also outperforms the state-of-the-art in both same project and cross project settings, with meaningful improvements in precision, recall, and F1 score. We validate our input representation, and aggregation approaches for lifting predictions from the test matrix level to the test suite level, finding similar improvements in performance. MutationBERT not only enhances the state-of-the-art in predictive mutation testing, but also presents practical benefits for real-world applications, both in saving developer time and finding hard to detect mutants that prior approaches do not.

链接与引用

DOI 原文 · arXiv · PDF(开放获取) · DBLP

BibTeX
@inproceedings{abs-2309-02389,
  title = {Contextual Predictive Mutation Testing},
  author = {Kush Jain and Uri Alon and Alex Groce and Claire Le Goues},
  booktitle = {FSE},
  year = {2023},
  doi = {10.1145/3611643.3616289}
}