2021 · 23 citations · 36 references
ComputingCybersecurityMobile SecurityMobile SystemsSchedulingApplication Security TestingDynamic Application Security TestingFuzz TestingMobile Application DevelopmentMobile Application VulnerabilitiesSoftware TestingAndroid Application Security TestingApplication Programming Interface TestingEvent OrderingEvent-driven TestingMobile App TestingNon-deterministic Execution AnalysisTest Artifact DetectionThread
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.
36
An empirical analysis of flaky tests
Qingzhou Luo, Farah Hariri, Lamyaa Eloussi et al. · 2014 · 418 citations
Tongping Liu, Charlie Curtsinger, Emery D. Berger · 2011 · 237 citations
Jonathan Bell, Owolabi Legunsen, Michael Hilton et al. · 2018 · 165 citations · Full text
Understanding flaky tests: the developer’s perspective
Moritz Eck, Fabio Palomba, Marco Castelluccio et al. · 2019 · 159 citations