一句话:提出 TestWeaver,通过复用 LLM 对共享 UI 交互的决策,降低基于 LLM 的 UI 测试成本并提升效率。
本文关注移动应用 UI 测试中的冗余问题:真实测试套件中的冗余常表现为重复的 UI 交互。传统脚本化流程对此不敏感,但基于 LLM 的 UI agents 会因对相同交互反复查询 LLM 而付出高昂的决策延迟与 token 成本。为此,作者提出 TestWeaver,其核心是复用 LLM 此前的决策:借助语义标注的 UI Transition Graph 检测跨测试用例的共享交互,对每个交互只进行一次 LLM 查询,并在后续相同交互出现时复用结果。在美团真实测试套件上的评估显示,TestWeaver 达到 92% 成功率,平均每用例成本 0.11 美元、耗时 89.7 秒,优于现有方法;该系统已在美团实际测试流程中部署超过六个月,执行近 2000 个测试用例,发现 10 个此前未检测到的缺陷,并将人工测试工作量减少 75%。
Redundant test cases, although well-studied in software engineering, are previously underexplored in UI testing of mobile apps. Our study of real-world test suites shows that, equipped with large-scale testing suites, redundancy in UI testing often manifests as redundant UI interactions. Although negligible in traditional script-based workflows, such redundancy severely impacts the efficiency of emerging Large Language Model (LLM)-based UI agents, which incur substantial decision latency and token costs from repeated LLM queries for the same interactions. To this end, based on the idea of reusing LLMs’ former decisions, we present TestWeaver, a cost-effective LLM-based testing framework. Leveraging a semantic annotated UI Transition Graph (UTG), TestWeaver is capable of detecting shared interactions across test cases. It processes each interaction with a single LLM query, and reuses the result whenever the same interaction occurs. We evaluate TestWeaver on real-world test suites from Meituan. It achieves a 92% success rate with an average cost of $0.11 and 89.7 seconds per case, outperforming the state-of-the-art. We have also deployed TestWeaver in a real-world testing workflow at Meituan for over six months. TestWeaver has executed nearly 2,000 test cases and uncovered 10 previously undetected bugs, while reducing manual testing effort by 75%.
DOI 原文 ·
@inproceedings{paperbot9243,
title = {From Redundancy to Efficiency: Exploiting Shared UI Interactions towards Efficient LLM-Based Testing},
author = {Xuan Wang and Yingchuan Wang and Yongxiang Hu and Yu Zhang and Hailiang Jin and Shiyu Guo and Juxing Yuan and Yangfan Zhou},
booktitle = {ASE},
year = {2025},
doi = {10.1109/ase63991.2025.00284}
}