ASE2023

An Empirical Study on the Adoption of Scripted GUI Testing for Android Apps

Ruizhen Gu, José Miguel Rojas

被引用 4 次

摘要

In recent years, Android applications have become larger with the introduction of new features and integration with external APIs and services. As a consequence, testing these applications is more challenging and time-consuming for developers. To reduce manual testing efforts, several frameworks for automated GUI testing of Android applications have been developed, with Espresso and UI Automator being arguably the most popular ones. However, the adoption of these scripted GUI testing frameworks in Android projects remains surprisingly low. We investigate the use of two scripted GUI testing frameworks, Espresso and UI Automator among 475 non-trivial open-source Android applications with GUI tests. We also design and conduct an experiment involving human developers to observe and understand their approach to Android automated testing tasks using these two frameworks, analysing the resulting test code and their perception of the tasks. Our preliminary results show that 58% of Android apps with GUI tests utilise Espresso APIs while only 4 % used UI Automator, 71 % of the apps that use UI Automator effectively combine it with Espresso, and novice developers tend to prefer Espresso for GUI testing mainly because of its simpler API while agreeing that the combination of the two frameworks can be beneficial in covering diverse test cases.