paperbot · PL 论文追踪

全部论文 待读 收藏

P2 FlakeFlagger: Predicting Flakiness Without Rerunning Tests

FlakeFlagger:无需重跑测试预测测试不稳定性
ICSE 2021 IEEE/ACM 43rd International Conference on Software Engineering (ICSE)2021匹配度 2/10 · 论文属于软件测试中的 flaky test 预测,使用机器学习特征而非静态分析、LLM/Agent、浮点或贝叶斯程序分析;与画像关注的 PL 与 AI 交叉(静态分析/形式化验证、Agentic 程序分析)几乎没有直接关系。引用 105 inbox
Abdulrahman Alshammari, Christopher Morris, Michael Hilton, Jonathan Bell
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:提出 FlakeFlagger,用测试行为特征预测可能 flaky 的测试,无需重跑,显著降低误报。

回归测试中的 flaky 测试会非确定性地通过或失败,削弱开发者对测试结果的信任。传统识别方法需多次重跑测试,但作者对 24 个项目各重跑 10,000 次的大规模实证研究发现,即便如此仍可能漏检。FlakeFlagger 为每个测试抽取一组刻画其行为的特征,再基于行为相似性预测哪些测试可能 flaky,从而避免重跑。在含 flaky 测试的 23 个项目上,与当前最优 flaky 测试分类器相比,FlakeFlagger 正确标记的 flaky 测试数量至少相当,但误报显著更少;按 F1 在 16 个项目上更优,4 个项目持平。结果表明它可在昂贵检测前有效筛选疑似 flaky 测试。

问题
flaky 测试非确定性失败且难以识别,传统方法需反复重跑测试,成本高且仍可能漏检。
方法
FlakeFlagger 抽取描述每个测试行为的特征,并基于相似行为特征预测哪些测试可能 flaky,而无需重跑。
评估
在 24 个项目大规模重跑研究及 23 个含 flaky 测试项目上评估,与当前最优分类器比较 F1 和误报率,16 个项目更优、4 个项目持平,误报更少。
原文摘要(Abstract)

When developers make changes to their code, they typically run regression tests to detect if their recent changes (re) introduce any bugs. However, many tests are flaky, and their outcomes can change non-deterministically, failing without apparent cause. Flaky tests are a significant nuisance in the development process, since they make it more difficult for developers to trust the outcome of their tests, and hence, it is important to know which tests are flaky. The traditional approach to identify flaky tests is to rerun them multiple times: if a test is observed both passing and failing on the same code, it is definitely flaky. We conducted a very large empirical study looking for flaky tests by rerunning the test suites of 24 projects 10,000 times each, and found that even with this many reruns, some previously identified flaky tests were still not detected. We propose FlakeFlagger, a novel approach that collects a set of features describing the behavior of each test, and then predicts tests that are likely to be flaky based on similar behavioral features. We found that FlakeFlagger correctly labeled as flaky at least as many tests as a state-of-the-art flaky test classifier, but that FlakeFlagger reported far fewer false positives. This lower false positive rate translates directly to saved time for researchers and developers who use the classification result to guide more expensive flaky test detection processes. Evaluated on our dataset of 23 projects with flaky tests, FlakeFlagger outperformed the prior approach (by F1 score) on 16 projects and tied on 4 projects. Our results indicate that this approach can be effective for identifying likely flaky tests prior to running time-consuming flaky test detectors.

链接与引用

DOI 原文 · DBLP

BibTeX
@inproceedings{AlshammariMH021,
  title = {FlakeFlagger: Predicting Flakiness Without Rerunning Tests},
  author = {Abdulrahman Alshammari and Christopher Morris and Michael Hilton and Jonathan Bell},
  booktitle = {ICSE},
  year = {2021},
  doi = {10.1109/icse43902.2021.00140}
}