paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Reproducing Timing-Dependent GUI Flaky Tests in Android Apps via a Single Event Delay

通过单一事件延迟复现 Android 应用中的时序相关 GUI 不稳定测试
ISSTA Proceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis2024匹配度 1/10 · 该论文属于 Android GUI flaky test 的动态分析复现,核心是测试与调试,不涉及用户关注的静态分析、ML/Agentic 程序分析、LLM 与程序分析交叉、浮点程序分析或贝叶斯程序分析。因此与研究方向几乎无关。引用 2 inbox
Xiaobao Cai, Zhen Dong, Yongjiang Wang, Abhishek Tiwari, Xin Peng
crossref: 2026-09-12

AI 速览

一句话:提出基于动态分析推断 GUI 事件竞态并选择性延迟相关事件的方法,可快速可靠复现 Android 时序相关 flaky 测试。

不稳定测试(flaky tests)在同一代码版本上时而通过、时而失败,常误导开发者调试不存在的缺陷,而传统多次重跑复现方式耗时且可靠性低。本文聚焦 Android 应用中最常见的时序相关 GUI flaky 测试,其核心见解是这类不确定性常源于 GUI 数据上的事件竞态。给定失败栈迹,技术通过动态分析推断可能导致该失败的事件竞态,并仅选择性地延迟参与竞态的相关事件,从而以最少测试运行次数复现失败。作者在从 22 个广泛使用的 Android 应用收集的 80 个时序相关 flaky 测试上进行实验,成功复现其中 73 个,平均仅需 1.71 次测试运行;并且能够连续 20 次稳定复现同一失败,表现出很高可靠性。

问题
Android 应用中时序相关的 GUI flaky 测试难以复现,传统反复重跑方式耗时、耗资源且不可靠,阻碍开发者有效调试。
方法
基于失败栈迹进行动态分析,推断可能导致失败的 GUI 事件竞态,并通过选择性延迟竞态相关事件来复现失败。
评估
在来自 22 个常用 Android 应用的 80 个时序相关 flaky 测试上评估,73 个成功复现,平均 1.71 次运行,并可连续 20 次稳定复现。
原文摘要(Abstract)

Flaky tests hinder the development process by exhibiting uncertain behavior in regression testing. A flaky test may pass in some runs and fail in others while running on the same code version. The non-deterministic outcome frequently misleads the developers into debugging non-existent faults in the code. To effectively debug the flaky tests, developers need to reproduce them. The industry de facto to reproduce flaky tests is to rerun them multiple times. However, rerunning a flaky test numerous times is time and resource-consuming. This work presents a technique for rapidly and reliably reproducing timing-dependent GUI flaky tests, acknowledged as the most common type of flaky tests in Android apps. Our insight is that flakiness in such tests often stems from event racing on GUI data. Given stack traces of a failure, our technique employs dynamic analysis to infer event races likely leading to the failure and reproduces it by selectively delaying only relevant events involved in these races. Thus, our technique can efficiently reproduce a failure within minimal test runs. The experiments conducted on 80 timing-dependent flaky tests collected from 22 widely-used Android apps show our technique is efficient in flaky test failure reproduction. Out of the 80 flaky tests, our technique could successfully reproduce 73 within 1.71 test runs on average. Notably, it exhibited extremely high reliability by consistently reproducing the failure for 20 runs.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot8480,
  title = {Reproducing Timing-Dependent GUI Flaky Tests in Android Apps via a Single Event Delay},
  author = {Xiaobao Cai and Zhen Dong and Yongjiang Wang and Abhishek Tiwari and Xin Peng},
  booktitle = {ISSTA},
  year = {2024},
  doi = {10.1145/3650212.3680377}
}