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.
翻译:通过测试来校验安卓应用程序是困难的,因为存在片状测试。 由于非决定性的执行环境, 一系列事件( 测试) 可能会以无法预测的方式导致成功或失败。 在这项工作中, 我们展示了一种方法和工具 FlakeShovel, 以便通过系统探索事件命令来检测不透明测试。 我们的主要观察是, 在移动应用程序中进行测试时, 有一种测试框架线, 产生测试事件, 一个主要的用户- 界面( UI) 线处理这些事件, 并且可能还有其他几种背景线在不同步地运行。 对于任何事件, 其执行可能涉及非确定主义, 任何事件( 测试) 都可能导致成功或失败。 在( 之前) 必须发生的事件后, 我们将最早( 最晚) 事件定位为本地化 。 我们然后在将事件分组到一个单项中, 找出测试结果是否不透明。 我们还在AndroidFlaker Apps 上创建了一套名为 Droid Flaker 的主题程序, 来研究烟状测试。 我们在对象中进行的实验展示了我们粉状测试的测试工具, 。 我们的工作是用来测试测试的辅助的测试, 。 我们的测试工具,, 只能为测试, 的测试, 我们的测试, 的测试只是测试, 测试的测试的测试工具只能用来进行。