Repairing Obsolete GUI Test Scripts for Android Applications with Exploration and Backtracking

Ruihua Ji,Zhengxuan Qian,Zhong Li,Xiaoqing Zhu,Yu Pei,Minxue Pan,Tian Zhang
DOI: https://doi.org/10.1145/3671016.3671377
2024-01-01
Abstract:Today, Android applications (apps) have become ubiquitous in various aspects of life, highlighting the importance of graphical user interface (GUI) testing in ensuring their quality. To address the high cost associated with manual GUI testing, automated GUI test scripts are commonly developed. However, as Android apps evolve rapidly to offer more services or enhance existing ones, the GUI of these applications undergoes changes between the base and updated versions, leading to the obsolescence of existing GUI test scripts and increased maintenance costs. While existing repair approaches effectively manage minor GUI changes by replacing the locators of relevant widgets, they face challenges in addressing complex updates that bring significant GUI changes, thereby altering the interaction logic. This paper proposes a novel GUI test script repair approach to tackle these challenges. The approach utilizes an exploration and backtracking method to address the substantial GUI changes introduced by complex updates. By controlling the exploration space through exploration priority and pruning techniques, the approach achieves high effectiveness in repairing obsolete GUI tests caused by complex updates. We implemented our approach into a tool and evaluated its effectiveness and efficiency on 22 open-source Android apps and a total of 122 obsolete GUI test scripts. The experimental results showed that our approach can successfully repair 90% of the obsolete GUI test scripts.
What problem does this paper attempt to address?