CamDroid: Context-Aware Model-Based Automated GUI Testing for Android Apps
Hongyi Wang,Yang Li,Jing Yang,Daqiang Hu,Zhi Liao
DOI: https://doi.org/10.26599/tst.2024.9010038
2024-09-14
Tsinghua Science & Technology
Abstract:Recent years have witnessed the widespread adoption of mobile applications (apps for short). For quality-of-service and commercial competitiveness, sufficient Graphical User Interface (GUI) testing is required to verify the robustness of the apps. Given that testing with manual efforts is time-consuming and error-prone, automated GUI testing has been widely studied. However, existing approaches mostly focus on GUI exploration while lacking attention to complex interactions with apps, especially generating appropriate text inputs like real users. In this paper, we introduce CamDroid, a lightweight context-aware automated GUI testing tool, which can efficiently explore app activities through (1) a model-based UI-guided testing strategy informed by the context of previous event-activity transitions and (2) a data-driven text input generation approach regarding the GUI context. We evaluate CamDroid on 20 widely-used apps. The results show that CamDroid outperforms non-trivial baselines in activity coverage, crash detection, and test efficiency.
computer science, information systems,engineering, electrical & electronic, software engineering