π€ AI Summary
This work addresses the challenges posed by the event-driven nature and development diversity of Android applications, which hinder static analysis from constructing complete control-flow models, while existing dynamic testing approaches suffer from low efficiency and insufficient coverage. To overcome these limitations, the paper proposes DroidGraph, a framework that integrates static code analysis with systematic exploration to build a unified control-flow model bridging low-level method invocations and high-level UI structures, thereby enabling efficient automated test generation. Experimental evaluation on 19 real-world applications demonstrates that DroidGraph achieves 18% higher coverage of application content with 345 fewer interactions on average compared to random exploration, and additionally uncovers 51 previously missed components and 49% more UI callback links.
π Abstract
Mobile application development is a fast paced industry with frequent releases. While the development pace increases, so too does the need for automated test generation. Model-based test generation is one of the most common and successful approaches to support this need. Understanding and modelling the application under test is integral to producing comprehensive, dependable and effective tests. Unfortunately, mobile platforms such as Android, introduce a host of difficulties. Static analysis struggles with Android's event-based nature and the growing variety of mechanisms available for developers to implement different features. Additionally, dynamic analysis, implemented by popular random test generators, is slow, inefficient, and limited by a lack of application knowledge.
This paper introduces DroidGraph, a framework to generate a comprehensive control flow model of Android applications using traditional static analysis and efficient systematic exploratory tests. DroidGraph provides a detailed model of an Android application, from low level method statements to high level user interface structures. This model can be used to support automated test generation. We apply DroidGraph to 19 diverse apps and show that our efficient exploratory tests, on average, interact with 18% more of the app than commonly used random exploration in 345 less interactions. Integrating the dynamic analysis results provided by these tests complements our static analysis, and uncovers on average 51 more components and 49% more interface callback links in the application code.