Improving Mobile User Interface Testing with Model Driven Monkey Search
Jordan Doyle 1 , Takfarinas Saber 1 , Paolo Arcaini 2 , and Anthony Ventresque 1 · 2026
Read Improving Mobile User Interface Testing with Model Driven Monkey Search by Jordan Doyle 1 , Takfarinas Saber 1 , Paolo Arcaini 2 , and Anthony Ventresque 1 (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2608-00236.txt.
Introduction
Doyle and co-authors improve mobile interface testing with a model-driven monkey search. Android testing tools like Exerciser Monkey simulate user input at random. Touches, gestures, and keys give developers a sense of deployed behaviour. Such tools know nothing of the app's structure, though. Random or scripted interaction makes them slow and poor at finding bugs.
Their control flow structure represents Android code plus all interactive elements. Monkey++ searches that structure with depth-first search. The random monkey creates slow suites with poor coverage. The model-driven suite runs an order of magnitude faster. It achieves full coverage of user interaction elements. The work points to better targeted search-based Android testing.
Catalog record
| CREATOR | Jordan Doyle 1 , Takfarinas Saber 1 , Paolo Arcaini 2 , and Anthony Ventresque 1 |
|---|---|
| YEAR | 2026 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 38 KB |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2608.00236
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Improving Mobile User Interface Testing with Model Driven Monkey Search Thanks: This work was supported, in part, by the Science Foundation Ireland grants 13/RC/2094_P2 and 17/RC-PhD/3485. Paolo Arcaini is supported by ERATO HASUO Metamathematics for Systems Design Project (No. JPMJER1603), JST; Funding Reference number: 10.13039/501100009024 ERATO. Jordan Doyle 1 , Takfarinas Saber 1 , Paolo Arcaini 2 , and Anthony Ventresque 1 Abstract Testing mobile applications often relies on tools, such as Exerciser Monkey for Android systems, that simulate user input. Exerciser Monkey, for example, generates random events (e.g., touches, gestures, navigational keys) that give developers a sense of what their application will do when deployed on real mobile phones with real users interacting with it. These tools, however, have no knowledge of the underlying applications’ structures and only interact with them randomly or in a predefined manner (e.g., if developers designed scenarios, a labour-intensive task) – making them slow and poor at finding bugs. In this paper, we propose a novel control flow structure able to represent the code of Android applications, including all the interactive elements. We show that our structure can increase the effectiveness (higher coverage) and efficiency (removing duplicate/redundant tests) of the Exerciser Monkey by giving it knowledge of the test environment. We compare the interface coverage achieved by the Exerciser Monkey with our new Monkey++ using a depth first search of our control flow structure and show that while the random nature of Exerciser Monkey creates slow test suites of poor coverage, the test suite created by a depth first search is one order of magnitude faster and achieves full coverage of the user interaction elements. We believe this research will lead to a more effective and efficient Exerciser Monkey, as well as better targeted search based techniques for automated Android testing. I Introduction Android has become the leading mobile operating system with 72.48% market share in December of 2020 [ 1 ] . The number of mobile app downloads each year has also increased steadily. In 2019, there were 204 billion app downloads, and $120 billion in revenue generated [ 2 ] . The validation of app quality is now essential, for both keeping users as well as gaining new ones, as app quality is an important factor of user retention [ 3 ] . Ensuring app quality (mostly through testing) is a labour and skill-intensive activity that is often done manually [ 4 , 5 ] (e.g., developers writing test scenarios) but would benefit from automatic tools [ 6 ] . However, despite the massive growth in research for automated testing techniques, it has been difficult to create a robust and efficient solution. It is the interactive and event-driven nature of the platform that presents the biggest challenge [ 7 ] . A user’s interaction with an application is highly reliant on their environment. Although mobile interfaces are structured, callback methods are invoked by the Android framework based on the current system state – which makes the creation of a representation for Android’s applications difficult e.g. Control Flow Graphs or Abstract Syntax Trees. Many different methods of automatic testing have emerged over the years to tackle the issues related to the interactive nature of Android. Some of these methods include automation frameworks [ 8 , 9 , 10 , 11 , 12 , 13 ] , which provide API’s for testers to write interactions as a script, or record and replay tools [ 14 , 15 , 16 , 17 ] that allow developers to record an interaction to be replayed later. While these methods have become popular in the Android community and a standard for Android testing, they are, unfortunately, highly manual and not efficient for large scale development. The majority of research toward Android testing has been devoted to generating user input automatically by means of random [ 18 , 19 ] , systematic [ 20 , 21 , 22 ] , or model-based [ 23 , 24 , 25 ] input generation, removing the manual labour usually required. The most popular and widely used automated framework has been Exerciser Monkey (also known as Monkey) [ 18 ] , which is packaged with the Android SDK. In this paper, we present a novel control flow structure able to represent the code of Android applications, including all the interactive elements. We show that the (control flow) graph generated by our solution can direct/support the execution of a tool like Monkey (We call our extension of Monkey Monkey++ ) and address two of the main challenges in testing Android apps using the framework: removing duplicate and redundant interactions (i.e., efficiency, using less resources) by tracking areas already explored by the test suite; and increasing test coverage (i.e., its effectiveness) by targeting unexplored areas of the application. Using our graph, we show the coverage achieved by both Monkey, the de facto standard automatic testing tool, and our new Monkey++ using a depth first search. Using 3 open source Android applications, we found that although Monkey achieves at least an average of 85% interface coverage, it takes 500 interaction attempts to achieve, with only an average of 8% actually interacting with the application. While the random nature of Monkey creates slow test suites of poor coverage, our search with Monkey++ is one order of magnitude faster and achieves full interface coverage. This shows that even though Monkey can be effective in discovering bugs, it can be made more efficient by integrating knowledge of the application structure enabling better test generation algorithms. This paper starts by discussing the related work in the area of Android Testing in Section II . Section III provides a formal definition and implementation of our control flow graph, including its structure, content, and functionality. Section IV defines the coverage metric we use to evaluate both Monkey and our new Monkey++. Section V describes our Monkey++ search method. Section VI discusses the results obtained from the Monkey’s random search and our Monkey++ DFS. Finally, Section VII concludes the paper. II Related Work Over the years many tools and frameworks have emerged to try improve Android interactive testing and 3 main categories have formed: automation frameworks and APIs, record and replay tools, and automated input generation tools [ 6 , 26 ] . While they do succeed in testing Android applications to different degrees, they all have drawbacks preventing them from solving the entire problem. It is important to point out that the set of frameworks discussed in this paper is not exhaustive, but represents the most well-known Android testing frameworks and tools. II-A Automation Frameworks and API’s Frameworks and API’s such as Monkey Runner [ 8 ] , Android View Client [ 9 ] , UI Automator [ 10 ] as well as many others [ 11 , 12 , 13 ] , allow developers to create testing scripts that run interactive events through the Android emulator. These tools allow users to test their application using the user interface in a similar manner to unit testing, which provides functional testing of application code as well as testing runtime behaviour of the activity lifecycle and user input callback methods. The developer is required to code an interaction with the device and then test