Autonomous Large Language Model Agents Enabling Intent-Driven Mobile GUI Testing
作者: Juyeon Yoon, Robert Feldt, Shin Yoo
分类: cs.SE, cs.AI
发布日期: 2023-11-15
备注: 10 pages
💡 一句话要点
提出DroidAgent以解决自动化GUI测试的高层决策问题
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 自动化测试 GUI测试 大型语言模型 意图驱动 自主代理 软件工程 移动应用
📋 核心要点
- 现有的GUI测试方法主要依赖人工决策,缺乏高层次的自动化,导致测试效率低下。
- DroidAgent通过大型语言模型实现意图驱动的自动化GUI测试,能够自主设定和执行测试任务。
- 实验证明,DroidAgent在15个应用上实现了61%的活动覆盖率,超越了现有技术的51%,且任务的相关性和现实性较高。
📝 摘要(中文)
GUI测试用于检查软件系统在用户与其图形界面交互时的预期行为。目前,决定高层次测试内容仍需人工操作,现有的自动化工具主要关注低层次的覆盖率指标。本文提出DroidAgent,一个基于大型语言模型的自主GUI测试代理,旨在实现语义驱动的自动化测试。DroidAgent能够设定相关任务目标并与Android应用进行交互。通过对15个Themis基准应用的实证评估,DroidAgent在任务设置和执行方面展现出更高的自主性,平均活动覆盖率达到61%,显著高于当前最先进技术的51%。
🔬 方法详解
问题定义:本文旨在解决现有GUI测试中高层次测试内容决策的人工依赖问题,现有方法主要关注低层次的覆盖率,导致测试效率低下。
核心思路:DroidAgent利用大型语言模型的能力,结合长短期记忆机制,实现意图驱动的自动化测试,能够自主设定任务目标并与应用进行交互。
技术框架:DroidAgent的整体架构包括任务目标设定模块、应用交互模块和反馈学习模块,能够根据应用的特性和用户意图进行深度交互。
关键创新:DroidAgent的最大创新在于其自主性和意图驱动的测试能力,能够在无人工干预的情况下完成复杂的测试任务,显著提高了测试的覆盖率和相关性。
关键设计:DroidAgent采用了长短期记忆网络来处理任务信息,设计了特定的损失函数以优化任务执行的有效性,并通过深度交互覆盖更多应用功能。
🖼️ 关键图片
📊 实验亮点
DroidAgent在15个应用的测试中实现了61%的活动覆盖率,相较于当前最先进的技术提升了10%。此外,317个自主创建的任务中有317个被确认与应用功能相关,显示出DroidAgent在任务相关性和深度交互方面的优势。
🎯 应用场景
DroidAgent的研究成果在移动应用的自动化测试领域具有广泛的应用潜力。它可以帮助开发者在软件开发生命周期中更高效地进行GUI测试,减少人工干预,提高测试的准确性和全面性。未来,该技术可能扩展到其他类型的软件测试和质量保证领域,推动软件工程的自动化进程。
📄 摘要(原文)
GUI testing checks if a software system behaves as expected when users interact with its graphical interface, e.g., testing specific functionality or validating relevant use case scenarios. Currently, deciding what to test at this high level is a manual task since automated GUI testing tools target lower level adequacy metrics such as structural code coverage or activity coverage. We propose DroidAgent, an autonomous GUI testing agent for Android, for semantic, intent-driven automation of GUI testing. It is based on Large Language Models and support mechanisms such as long- and short-term memory. Given an Android app, DroidAgent sets relevant task goals and subsequently tries to achieve them by interacting with the app. Our empirical evaluation of DroidAgent using 15 apps from the Themis benchmark shows that it can set up and perform realistic tasks, with a higher level of autonomy. For example, when testing a messaging app, DroidAgent created a second account and added a first account as a friend, testing a realistic use case, without human intervention. On average, DroidAgent achieved 61% activity coverage, compared to 51% for current state-of-the-art GUI testing techniques. Further, manual analysis shows that 317 out of the 374 autonomously created tasks are realistic and relevant to app functionalities, and also that DroidAgent interacts deeply with the apps and covers more features.