The Graphical User Interface (GUI) is how users interact with mobile apps. To ensure it functions properly, testing engineers have to make sure it functions as intended, based on test requirements that are typically written in natural language. While widely adopted manual testing and script-based methods are effective, they demand substantial effort due to the vast number of GUI pages and rapid iterations in modern mobile apps. This paper introduces AUITestAgent, the first automatic, natural language-driven GUI testing tool for mobile apps, capable of fully automating the entire process of GUI interaction and function verification. Since test requirements typically contain interaction commands and verification oracles. AUITestAgent can extract GUI interactions from test requirements via dynamically organized agents. Then, AUITestAgent employs a multi-dimensional data extraction strategy to retrieve data relevant to the test requirements from the interaction trace and perform verification. Experiments on customized benchmarks demonstrate that AUITestAgent outperforms existing tools in the quality of generated GUI interactions and achieved the accuracy of verifications of 94%. Moreover, field deployment in Meituan has shown AUITestAgent's practical usability, with it detecting 4 new functional bugs during 10 regression tests in two months.
翻译:图形用户界面(GUI)是用户与移动应用程序交互的主要方式。为确保其功能正常,测试工程师必须依据通常以自然语言编写的测试需求,验证其是否按预期运行。虽然广泛采用的手动测试和基于脚本的方法行之有效,但由于现代移动应用中GUI页面数量庞大且迭代迅速,这些方法需要投入大量人力。本文介绍了AUITestAgent,这是首个面向移动应用的、由自然语言驱动的全自动GUI测试工具,能够完整自动化执行GUI交互与功能验证的全流程。由于测试需求通常包含交互指令与验证准则,AUITestAgent可通过动态组织的智能体从测试需求中提取GUI交互操作。随后,该工具采用多维数据提取策略,从交互轨迹中检索与测试需求相关的数据并执行验证。在定制化基准测试上的实验表明,AUITestAgent在生成GUI交互的质量方面优于现有工具,验证准确率达到94%。此外,在美团的实地部署证明了AUITestAgent的实际可用性——在为期两个月的10次回归测试中,该工具发现了4个新的功能缺陷。