paperbot · PL 论文追踪

全部论文 待读 收藏

P2 The Importance of Accounting for Execution Failures when Predicting Test Flakiness

在预测测试不稳定性时考虑执行失败的重要性
ASE Proceedings of the 39th IEEE/ACM International Conference on Automated Software Engineering2024匹配度 1/10 · 该论文研究软件测试中的不稳定测试预测,属于测试与调试领域,与用户关注的静态分析、LLM/Agent 改进分析、浮点程序分析或贝叶斯程序分析均无直接关联。它不涉及 PL 与 AI 的交叉,也不涉及 LLM 或 Agentic 程序分析。引用 10 inbox
Guillaume Haben, Sarra Habchi, John Micco, Mark Harman, Mike Papadakis, Maxime Cordy, Yves Le Traon
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:实证表明不稳定测试具有强故障发现能力,主张预测对象应从「不稳定测试」转向「不稳定测试执行」。

不稳定测试(flaky test)在同一程序版本的不同执行中时而通过时而失败,浪费开发者排查假告警的时间,已有大量预测方法试图识别它们。然而这些方法通常在单个发布版本的数据上评估,忽略了一个重要事实:某版本中偶发失败的测试,在另一个版本中可能真实失败并暴露缺陷,这种正确失败可能因此被忽视。本文通过跨版本实证分析表明该情形普遍存在:不稳定测试具有很强的故障揭示能力,揭示了超过三分之一的回归故障;在被测代码库中所有揭示故障的测试执行里,76.2% 来自现有预测方法判定为 flaky 的测试。这一发现对研究者与工业实践均构成警示,并促使未来研究转向预测「不稳定的测试执行」而非「不稳定的测试」本身。

问题
现有 flaky test 预测方法多基于单版本数据评估,忽略了同一测试在其它版本中可能正确失败并揭示缺陷,导致这类有价值的失败被忽视,其实际效用存疑。
方法
通过跨多个发布版本的实证分析,考察不稳定测试的故障揭示能力,并统计现有预测方法所判定的 flaky 测试在全部故障揭示执行中的占比。
评估
分析显示不稳定测试揭示了超过 1/3 的回归故障,且 76.2% 的故障揭示执行来自现有预测方法归类为 flaky 的测试,说明预测粒度需从测试级细化到执行级。
原文摘要(Abstract)

Flaky tests are tests that pass and fail on different executions of the same version of a program under test. They waste valuable developer time by making developers investigate false alerts (flaky test failures). To deal with this issue, many prediction methods have been proposed. However, the utility of these methods remains unclear since they are typically evaluated based on single-release data, ignoring that in many cases tests that fail flakily in one release also correctly fail (indicating the presence of bugs) in some other, meaning that it is possible for subsequent correctly-failing cases to pass unnoticed. In this paper, we show that this situation is prevalent and can raise significant concerns for both researchers and practitioners. In particular, we show that flaky tests, tests that exhibit flaky behaviour at some point in time, have a strong fault-revealing capability, i.e., they reveal more than 1/3 of all encountered regression faults. We also show that 76.2%, of all test executions that reveal faults in the codebase under test are made by tests that are classified as flaky by existing prediction methods. Overall, our findings motivate the need for future research to focus on predicting flaky test executions instead of flaky tests.CCS CONCEPTS• Software and its engineering → Software testing and debugging.

链接与引用

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

BibTeX
@inproceedings{HabenHMHPCT24,
  title = {The Importance of Accounting for Execution Failures when Predicting Test Flakiness},
  author = {Guillaume Haben and Sarra Habchi and John Micco and Mark Harman and Mike Papadakis and Maxime Cordy and Yves Le Traon},
  booktitle = {ASE},
  year = {2024},
  doi = {10.1145/3691620.3695261}
}