A Curiosity-Driven Crawling Approach for Automated Testing of Android Apps
摘要
In recent years, the widespread adoption of smart mobile devices has driven a significant increase in demand for Android apps, creating a growing need for effective Android app testing. One crucial method to testing Android apps is the automated exploration of their GUIs to detect potential crashes. To facilitate this, we previously developed ACE (Android CrawlEr), a model-based GUI testing tool for Android apps that employs a search-based algorithm to explore and test the app under test (AUT). However, ACE’s initial approach did not utilize the app’s GUI structure information and crawling results to guide the exploration, which could limit its effectiveness. In this paper, we extend ACE by incorporating the structure of GUI states and the effects of GUI event execution on subsequent exploration. Specifically, a curiosity-driven crawling strategy is formulated to guide ACE’s exploration behavior. This strategy enables analyzing and calculating the curiosity of each GUI state dynamically based on its components and the results of event executions. The GUI states with higher curiosity are prioritized for exploration, thereby enhancing the crawling efficiency and code coverage of the AUT. Experimental results demonstrate that the proposed method can effectively enhance the crawling efficiency of ACE. Furthermore, compared to other state-of-the-art testing tools, ACE can increase statement coverage by an average of over 4%.