Think Outside the Box: Automating Inter-App Functionality Testing via Memory Implanting and Reasoning
Inter-app functionality requires multiple apps to collaborate to complete a functional task, which has become essential in modern software ecosystems. However, due to the dynamic updates and openness of modern apps, automated GUI testing based on predefined interaction models or trained on historical data is difficult to achieve inter-app testing. The low fault tolerance and context-dependent characteristics of inter-app functionality paths, lead the LLM-based GUI testing to have UI semantic mapping ambiguity and irreversible operation generating problem. To address these challenges, this paper proposes InterDroid, an automated GUI testing approach that enhances inter-app testing by implanting structured semantic knowledge into LLM’s memory. InterDroid retrieves relevant historical inter-app interactions using a multimodal retrieval method that integrates visual and textual GUI information, significantly improving retrieval accuracy. Inspired by the research on memory implantation in cognitive psychology, we design a memory implanting mechanism: global memory presents inter-app paths in a conversational form, simulating prior testing experience, and local memory tracks real-time state transitions. Additionally, InterDroid proposes a testing monitor that dynamically tracks testing progress and detects deviations, ensuring comprehensive test execution. InterDroid is designed as an integrable module that activates upon detecting the transition of the app to another app, allowing existing automated GUI testing tools to continue seamlessly after inter-app testing is completed. We evaluate InterDroid on 100 inter-app functionalities across 63 apps, comparing it with state-of-the-art GUI testing baselines. InterDroid achieves up to 133% improvement in page coverage, 124% in action coverage, and 268% in exact match accuracy over the best baseline. Furthermore, InterDroid detects 43 new crash bugs in real-world apps from Google Play, with 31 fixed and 12 confirmed by developers, demonstrating InterDroid’s effectiveness.