paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Flaky test detection in Android via event order exploration

Android 中通过事件顺序探索检测 flaky test
FSE Proceedings of the 29th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering2021匹配度 2/10 · 论文聚焦 Android flaky test 检测与事件顺序探索,属于传统软件测试/并发分析,与用户核心方向(ML/Agentic 程序静态分析、LLM 与程序分析/浮点/贝叶斯交叉)没有直接关联;其 FlakyAppRepo 数据集也不属于用户关注的重要场景 benchmark。引用 24 inbox
Zhen Dong, Abhishek Tiwari, Xiao Liang Yu, Abhik Roychoudhury
crossref: 2026-09-12

AI 速览

一句话:提出 FlakeScanner,通过探索事件顺序检测 Android 应用中的 flaky test,并发布 FlakyAppRepo 数据集。

Android 应用测试因非确定性执行环境而存在 flaky test:同一事件序列可能时而成功时而失败。本文提出 FlakeScanner,通过探索事件顺序检测 flaky test。方法观察到测试涉及测试框架线程、主 UI 线程和异步后台线程;对执行中涉及潜在非确定性的事件 e,先定位其必须发生的最早/最晚边界事件,再在边界事件之间高效探索调度,并将同一语句内的事件分组,以判断测试结果是否 flaky。作者还构建了包含 33 个常用 Android 项目的 FlakyAppRepo。实验在 52 个已知 flaky test 中检测出 45 个,并在 1444 个测试中发现 245 个未知 flaky test。

问题
Android 应用测试中 flaky test 导致验证困难,同一事件序列因非确定性执行环境可能成功或失败。
方法
FlakeScanner 通过定位涉及非确定性事件的上下界事件,并探索其间的调度及分组同一语句内事件来检测 flaky test。
评估
构建含 33 个 Android 项目的 FlakyAppRepo,在 52 个已知 flaky test 中检出 45 个,并在 1444 个测试中发现 245 个未知 flaky test。
原文摘要(Abstract)

Validation of Android apps via testing is difficult owing to the presence of flaky tests. Due to non-deterministic execution environments, a sequence of events (a test) may lead to success or failure in unpredictable ways. In this work, we present an approach and tool FlakeScanner for detecting flaky tests through exploration of event orders. Our key observation is that for a test in a mobile app, there is a testing framework thread which creates the test events, a main User-Interface (UI) thread processing these events, and there may be several other background threads running asynchronously. For any event e whose execution involves potential non-determinism, we localize the earliest (latest) event after (before) which e must happen. We then efficiently explore the schedules between the upper/lower bound events while grouping events within a single statement, to find whether the test outcome is flaky. We also create a suite of subject programs called FlakyAppRepo (containing 33 widely-used Android projects) to study flaky tests in Android apps. Our experiments on the subject-suite FlakyAppRepo show FlakeScanner detected 45 out of 52 known flaky tests as well as 245 previously unknown flaky tests among 1444 tests.

链接与引用

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

BibTeX
@inproceedings{paperbot6450,
  title = {Flaky test detection in Android via event order exploration},
  author = {Zhen Dong and Abhishek Tiwari and Xiao Liang Yu and Abhik Roychoudhury},
  booktitle = {FSE},
  year = {2021},
  doi = {10.1145/3468264.3468584}
}