Standing on the Shoulders of Giants: Bug-Aware Automated GUI Testing via Retrieval Augmentation
arXiv:2612.04126 · doi:10.1145/3715755
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.
arXiv commentAccepted by FSE 2025
References in corpus (13)
- Large-Scale Analysis of Framework-Specific Exceptions in Android Apps
- Generating Accurate Assert Statements for Unit Test Cases using Pretrained Transformers
- Deep Reinforcement Learning for Black-Box Testing of Android Apps
- Using Large Language Models to Generate JUnit Tests: An Empirical Study
- Owl Eyes: Spotting UI Display Issues via Visual Understanding
- Nighthawk: Fully Automated Localizing UI Display Issues via Visual Understanding
- Guided Bug Crush: Assist Manual GUI Testing of Android Apps via Hint Moves
- VET: Identifying and Avoiding UI Exploration Tarpits
- CoderEval: A Benchmark of Pragmatic Code Generation with Generative Pre-trained Models
- Unblind Text Inputs: Predicting Hint-text of Text Input in Mobile Apps via LLM
- Chatting with GPT-3 for Zero-Shot Human-Like Mobile Automated GUI Testing
- Mobile-Agent: Autonomous Multi-Modal Mobile Device Agent with Visual Perception
- A3Test: Assertion-Augmented Automated Test Case Generation