arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2005.10762cs.SE
收藏

Android应用中并发相关的Flaky Test检测

Concurrency-related Flaky Test Detection in Android apps

Zhen Dong, Abhishek Tiwari, Xiao Liang Yu, Abhik Roychoudhury

摘要:

通过测试验证Android应用程序是困难的,因为存在测试。由于不确定的执行环境,一系列事件(测试)可能以不可预测的方式导致成功或失败。在这项工作中,我们提出了一种方法和工具FlakeShovel通过系统的探索事件顺序检测的测试。我们的主要观察是,对于移动应用程序中的测试,有一个测试框架线程创建测试事件,一个主用户界面(UI)线程处理这些事件,可能还有几个其他后台线程异步运行。对于任何事件e,其执行涉及潜在的非确定性,我们定位e必须发生的最早(最晚)事件之后(之前)。然后,我们有效地探索上/下限事件之间的时间表,同时将事件分组在单个语句中,以确定测试结果是否是错误的。我们还创建了一套名为DroidFlaker的主题程序来研究Android应用程序中的重复测试。我们在主题套件DroidFlaker上的实验证明了我们的测试检测的有效性。我们的工作是对现有的测试检测工具的补充,比如Deflaker,它只检查失败的测试。FlakeShovel可以在通过的测试中检测到重复测试,正如我们的方法和实验所示。

英文摘要:

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 FlakeShovel for detecting flaky tests through systematic 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 DroidFlaker to study flaky tests in Android apps. Our experiments on subject-suite DroidFlaker demonstrate the efficacy of our flaky test detection. Our work is complementary to existing flaky test detection tools like Deflaker which check only failing tests. FlakeShovel can detect flaky tests among passing tests, as shown by our approach and experiments.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑