Standing on the Shoulders of Giants: Bug-Aware Automated GUI Testing via Retrieval Augmentation
Mengzhuo Chen, Zhe Liu, Chunyang Chen, Junjie Wang, Boyu Wu, Jun Hu, Qing Wang
Abstract
In software development, similar apps often encounter similar bugs due to shared functionalities and implementation methods. However, current automated GUI testing methods mainly focus on generating test scripts to cover more pages by analyzing the internal structure of the app, without targeted exploration of paths that may trigger bugs, resulting in low efficiency in bug discovery. Considering that a large number of bug reports on open source platforms can provide external knowledge for testing, this paper proposes BugHunter, a novel bug-aware automated GUI testing approach that generates exploration paths guided by bug reports from similar apps, utilizing a combination of Large Language Models (LLMs) and Retrieval-Augmented Generation (RAG). Instead of focusing solely on coverage, BugHunter dynamically adapts the testing process to target bug paths, thereby increasing bug detection efficiency. BugHunter first builds a high-quality bug knowledge base from historical bug reports. Then it retrieves relevant reports from this large bug knowledge base using a two-stage retrieval process, and generates test paths based on similar apps' bug reports. BugHunter also introduces a local and global path-planning mechanism to handle differences in functionality and UI design across apps, and the ambiguous behavior or missing steps in the online bug reports. We evaluate BugHunter on 121 bugs across 71 apps and compare its performance against 16 state-of-the-art baselines. BugHunter achieves 60% improvement in bug detection over the best baseline, with comparable or higher coverage against the baselines. Furthermore, BugHunter successfully detects 49 new crash bugs in real-world apps from Google Play, with 33 bugs fixed, 9 confirmed, and 7 pending feedback.
Create a lesson
Metadata
- Journal
- Proceedings of the ACM on Software Engineering 2(FSE), Article FSE038, pp. 825-846 (2025)
- Comments
- Accepted by FSE 2025
Related papers
Think Outside the Box: Automating Inter-App Functionality Testing via Memory Implanting and Reasoning
Shared title terminologycs.SEMengzhuo Chen, Zhe Liu, Chunyang Chen et al.
A Large Language Model-Based Framework for Automated Game Quest Testing
Shared title terminologycs.SEEnhong Mu, Nianyu Li, Jinyu Cai et al.
Can Browser Agents Detect Accessibility Issues? An Interaction-Aware Benchmark for Web Accessibility Testing
Shared title terminologycs.SEKaiquan Chen, Hang Dong, Bo Qiao et al.
SimFusion: Multi-Fidelity Simulation-based Testing of Automated Driving Systems
Shared title terminologycs.SELev Sorokin, Berfin Dinler, Alessio Gambi et al.
Who Checks the Model Checkers: Hardened Testing of TLA+ Tools
Shared title terminologycs.SEIgor Konnov
Testing a Safety-Critical Matching Component of an LLM-Based Simulated Patient: Blind Test Sets, Overfitted Cut-offs and a Cascade
Shared title terminologycs.SEFaaz Khan Mohammad, Sanket Salvi