- Paper: FSE26
Graphical User Interface (GUI) testing is a primary technique for testing mobile applications. Among existing testing methods, script-based testing is widely adopted because test scripts can be replayed across devices and versions. However, as mobile apps evolve, frequent changes to GUI appearance and interaction logic often render scripts written for earlier versions obsolete. Existing repair approaches typically follow a stepwise framework, repairing scripts action by action. While effective for minor GUI appearance changes, they struggle when interaction logic is modified. In this paper, we present TUSR, a test unit–based repair framework that fundamentally departs from the stepwise paradigm. TUSR introduces the concept of a "Test Unit"—a contiguous sequence of test actions serving a single testing intention—and repairs scripts at the unit level. It first splits scripts into test units using a multi-modal LLM with a rule-based correction mechanism to ensure consistency, then conducts dynamic repair guided by a Chain-of-Thought prompt enhanced with reflective memory. Experiments on 20 real-world Android applications, covering 262 test scripts and 3,485 actions, demonstrate that TUSR significantly outperforms state-of-the-art black-box and white-box repair approaches.
Coming soon
- Appium 2.19.0
- Android SDK
- Android Emulator(7.1.1)
- Java 8
- Python 3.11
- Apks: The folder of all the experimental apps.
- config: The folder of all the configuration files.
- log: The folder of all the log files.
- output: The folder of all the output files. The test script file in under output/[app name]/TestCase.json
- Execute
appiumin the terminal
- This can be verified through executing
adb devicesin the terminal
pip install -r requirements.txt
- Change the value of
api-keyin config/llm.yaml
- Modify the config/app.yaml to set the real path
- Change the parameter
app_nameat line 422.- Run test_case_enhancer.py to split the test script into test units.
- Change the parameter
app_nameat line 868.- Run test_repairer.py to repair all the test scripts for one app.