LLM-based Abstraction and Concretization for GUI Test Migration

📅 2024-09-08
🏛️ arXiv.org
📈 Citations: 2
Influential: 1
📄 PDF
🤖 AI Summary
GUI test transfer across applications faces challenges such as mapping failure and incomplete test coverage due to structural heterogeneity among UI controls. This paper proposes a novel “abstraction–concretization” paradigm: instead of performing interface-level control mapping, it first abstracts universal test logic from multi-source, functionally equivalent test cases; then, leveraging a large language model (LLM), it concretizes this logic into executable test scripts for the target app via functional semantic alignment and joint GUI event–assertion generation. To our knowledge, this is the first approach to deeply integrate LLMs throughout both test logic generalization and target-specific adaptation, enabling functional-semantic-level transfer. Evaluated on the FrUITeR and Lin datasets, our method achieves functional test success rates of 64% (+191%) and 75% (+42%), respectively—demonstrating substantial improvements in transfer effectiveness and practicality.

Technology Category

Application Category

📝 Abstract
GUI test migration aims to produce test cases with events and assertions to test specific functionalities of a target app. Existing migration approaches typically focus on the widget-mapping paradigm that maps widgets from source apps to target apps. However, since different apps may implement the same functionality in different ways, direct mapping may result in incomplete or buggy test cases, thus significantly impacting the effectiveness of testing target functionality and the practical applicability. In this paper, we propose a new migration paradigm (i.e., abstraction-concretization paradigm) that first abstracts the test logic for the target functionality and then utilizes this logic to generate the concrete GUI test case. Furthermore, we introduce MACdroid, the first approach that migrates GUI test cases based on this paradigm. Specifically, we propose an abstraction technique that utilizes source test cases from source apps targeting the same functionality to extract a general test logic for that functionality. Then, we propose a concretization technique that utilizes the general test logic to guide an LLM in generating the corresponding GUI test case (including events and assertions) for the target app. We evaluate MACdroid on two widely-used datasets (including 31 apps, 34 functionalities, and 123 test cases). On the FrUITeR dataset, the test cases generated by MACdroid successfully test 64% of the target functionalities, improving the baselines by 191%. On the Lin dataset, MACdroid successfully tests 75% of the target functionalities, outperforming the baselines by 42%. These results underscore the effectiveness of MACdroid in GUI test migration.
Problem

Research questions and friction points this paper is trying to address.

Overcoming widget-mapping limitations in GUI test migration
Abstracting test logic for target functionality in apps
Generating effective GUI test cases using LLM guidance
Innovation

Methods, ideas, or system contributions that make the work stand out.

Abstraction-concretization paradigm for GUI test migration
MACdroid migrates GUI test cases via general test logic
LLM generates GUI test cases from abstracted logic
🔎 Similar Papers
No similar papers found.
Yakun Zhang
Yakun Zhang
Harbin Institute of Technology, Shenzhen
Software EngineeringProgram AnalysisGUI AgentLarge Language Model
C
Chen Liu
Key Lab of HCST (PKU), MOE; SCS, Peking University, Beijing, China
X
Xiao-Ping Xie
Singapore Management University, Singapore
Y
Yun Lin
Shanghai Jiao Tong University, Shanghai, China
Jin Song Dong
Jin Song Dong
Professor of Computer Science, National University of Singapore
Formal MethodsTrusted AISafe AIModel CheckingSports Analytics
Dan Hao
Dan Hao
Peking University
Software TestingSoftware EngineeringDebuggingCompiler Testing
L
Lu Zhang
Key Lab of HCST (PKU), MOE; SCS, Peking University, Beijing, China