paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Continuous test suite failure prediction

持续测试套件失败预测
ISSTA Proceedings of the 30th ACM SIGSOFT International Symposium on Software Testing and Analysis2021匹配度 2/10 · 该论文用机器学习预测持续集成中测试套件是否值得触发,属于软件工程中的测试/CI优化,与用户关注的静态分析、LLM/Agent 改进程序分析、浮点程序分析或贝叶斯程序分析均无直接交集。虽然涉及机器学习与程序语言/软件工程交叉,但并非用户研究画像的核心方向。引用 23 inbox
Cong Pan, Michael Pradel
crossref: 2026-09-12

AI 速览

一句话:提出基于机器学习的持续测试套件失败预测,判断代码变更是否值得触发测试,从而降低持续集成成本。

持续集成要求对每次代码变更频繁运行完整测试套件,带来高昂计算成本甚至人工等待成本,而实际只有约 4% 的测试套件调用会使原本通过的测试转为失败。本文提出持续测试套件失败预测,通过预测某次代码变更是否应触发测试套件来降低持续集成开销。方法核心是机器学习模型,其输入特征来自代码变更、测试套件以及项目开发历史,同时给出一个理论成本模型,刻画该方法在何种条件下值得使用。作者在 242 个开源项目的 1.5 万次测试套件运行上进行评估,结果表明该方法能有效预测运行测试是否可能暴露失败,并且相比即时缺陷预测和测试用例失败预测的基线特征,AUC 分别提升 13.9% 和 2.9%。

问题
持续集成中频繁运行完整测试套件成本很高,但绝大多数调用并不会发现失败,因此需要判断是否每次代码变更都必须运行测试套件。
方法
基于代码变更、测试套件和开发历史构造特征,训练机器学习模型预测此次变更是否应触发测试套件,并给出判断该方法是否划算的理论成本模型。
评估
在来自 242 个开源项目的 1.5 万次测试套件运行上评估预测效果,并与即时缺陷预测和测试用例失败预测的基线特征比较 AUC。
原文摘要(Abstract)

Continuous integration advocates to run the test suite of a project frequently, e.g., for every code change committed to a shared repository. This process imposes a high computational cost and sometimes also a high human cost, e.g., when developers must wait for the test suite to pass before a change appears in the main branch of the shared repository. However, only 4% of all test suite invocations turn a previously passing test suite into a failing test suite. The question arises whether running the test suite for each code change is really necessary. This paper presents continuous test suite failure prediction, which reduces the cost of continuous integration by predicting whether a particular code change should trigger the test suite at all. The core of the approach is a machine learning model based on features of the code change, the test suite, and the development history. We also present a theoretical cost model that describes when continuous test suite failure prediction is worthwhile. Evaluating the idea with 15k test suite runs from 242 open-source projects shows that the approach is effective at predicting whether running the test suite is likely to reveal a test failure. Moreover, we find that our approach improves the AUC over baselines that use features proposed for just-in-time defect prediction and test case failure prediction by 13.9% and 2.9%, respectively. Overall, continuous test suite failure prediction can significantly reduce the cost of continuous integration.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot6654,
  title = {Continuous test suite failure prediction},
  author = {Cong Pan and Michael Pradel},
  booktitle = {ISSTA},
  year = {2021},
  doi = {10.1145/3460319.3464840}
}