paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Evolution-aware detection of order-dependent flaky tests

演化感知的顺序依赖型 flaky 测试检测
ISSTA Proceedings of the 31st ACM SIGSOFT International Symposium on Software Testing and Analysis2022匹配度 2/10 · 该论文研究顺序依赖型 flaky 测试的检测,属于软件测试与调试领域,与用户画像中 PL→AI 的静态分析应用、AI→PL、浮点程序分析及贝叶斯程序分析等核心方向均无直接关联。引用 12 inbox
Chengpeng Li, August Shi
crossref: 2026-09-12

AI 速览

一句话:提出 IncIDFlakies,通过分析代码变更选择性地运行可能产生顺序依赖的测试,低成本检测新引入的顺序依赖型 flaky 测试。

回归测试受 flaky 测试困扰,其中顺序依赖型 flaky 测试的结果取决于测试执行顺序。已有检测方法需在单一代码版本上以不同顺序重跑全部测试,代价高昂,难以适应代码持续演化。本文提出 IncIDFlakies:在 iDFlakies 基础上分析代码变更,仅选择运行受变更影响且可能因共享状态而彼此产生顺序依赖的测试。在 67 个顺序依赖型 flaky 测试上(覆盖其项目中的相关变更,包括使它们变为 flaky 的变更)评估,IncIDFlakies 平均只运行 65.4% 的测试,在运行相同测试顺序数时耗时仅为基线 iDFlakies 全量测试的 68.4%,且仍保证所运行的顺序有可能检测到这些 flaky 测试。

问题
回归测试中,顺序依赖型 flaky 测试的检测通常需要在单一代码版本上以不同顺序重跑全部测试。随着代码持续演化,每次变更后都全量重跑代价过高。
方法
提出 IncIDFlakies,基于 iDFlakies 分析代码变更,选择仅运行受变更影响且可能因共享状态而彼此产生顺序依赖的测试,从而只检测新引入的顺序依赖型 flaky 测试。
评估
在 67 个顺序依赖型 flaky 测试及其项目中的相关代码变更(包括它们变成 flaky 的变更)上进行评估,IncIDFlakies 平均选择运行 65.4% 的测试,耗时仅为基线 iDFlakies 全量测试的 68.4%,并仍能确保所运行测试顺序有可能检测到这些 flaky 测试。
原文摘要(Abstract)

Regression testing is an important part of the software development process but suffers from the presence of flaky tests. Flaky tests are tests that can nondeterministically pass or fail regardless of code changes. Order-dependent flaky tests are a prominent kind of flaky tests whose outcome depends on the test order in which they are run. Prior work has focused on detecting order-dependent flaky tests through rerunning all tests in different test orders on a single version of code. As code is constantly changing, rerunning all tests in different test orders after every change is costly. In this work, we propose IncIDFlakies, a technique to detect order-dependent flaky tests by analyzing code changes to detect newly-introduced order-dependent flaky tests due to those changes. Building upon existing work in iDFlakies that reruns tests in dif- ferent test orders, IncIDFlakies analyzes and selects to run only the tests that (1) are affected by the change, and (2) can potentially result in a test-order dependency among each other due to potential shared state. Running IncIDFlakies on 67 order-dependent flaky tests across changes in code in their respective projects, including the changes where they became flaky, we find that IncIDFlakies can select to run on average 65.4% of all the tests, resulting in running 68.4% of the time that baseline iDFlakies would use when running the same number of test orders with the full test suite. Furthermore, we find that IncIDFlakies can still ensure that the test orders it runs can potentially detect the order-dependent flaky tests.

链接与引用

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

BibTeX
@inproceedings{paperbot7431,
  title = {Evolution-aware detection of order-dependent flaky tests},
  author = {Chengpeng Li and August Shi},
  booktitle = {ISSTA},
  year = {2022},
  doi = {10.1145/3533767.3534404}
}