arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2407.03037cs.SE
收藏

眼见为实:面向移动应用的视觉驱动非崩溃功能缺陷检测

Seeing is Believing: Vision-driven Non-crash Functional Bug Detection for Mobile Apps

Zhe Liu, Cheng Li, Chunyang Chen, Junjie Wang, Mengzhuo Chen, Boyu Wu, Yawen Wang, Jun Hu, Qing Wang

AI总结:

本文提出视觉驱动的多智能体协作 GUI 测试方法 Trident,利用 MLLM 理解页面转换与视觉线索,自动检测移动应用非崩溃功能缺陷,并在 590 个缺陷上显著优于 12 个基线。

摘要:

移动应用 GUI(图形用户界面)页面如今包含丰富的视觉信息,每个页面的视觉语义可帮助用户理解应用逻辑。然而,这些复杂的视觉与功能逻辑给软件测试带来了新的挑战。现有自动化 GUI 测试方法受限于缺乏可靠的测试预言,只能检测具有明显异常信号的崩溃缺陷。因此,许多非崩溃功能缺陷(从意外行为到逻辑错误)往往会逃过当前技术的检测。尽管这些非崩溃功能缺陷可能表现出可作为潜在测试预言的视觉线索,但它们通常涉及一系列屏幕截图,检测它们还需要理解 GUI 页面转换之间的操作逻辑,这对传统技术颇具挑战。鉴于多模态大语言模型(MLLM)在视觉和语言理解方面的卓越性能,本文提出 Trident,这是一种新颖的、视觉驱动的多智能体协作自动化 GUI 测试方法,用于检测非崩溃功能缺陷。它由三个智能体组成:Explorer、Monitor 和 Detector,分别负责引导探索、监督测试进展以及发现问题。我们还应对了若干挑战,即为 MLLM 输入对齐视觉与文本信息、实现面向功能的探索,以及推断非崩溃缺陷的测试预言,以提升功能缺陷检测性能。我们在 590 个非崩溃缺陷上评估 Trident,并将其与 12 个基线进行比较;与最佳基线相比,其平均召回率和精确率可分别实现超过 14%–112% 和 108%–147% 的提升。消融研究进一步证明了每个模块的贡献。此外,Trident 在 Google Play 上识别出 43 个新缺陷,其中 31 个已被修复。

英文摘要:

Mobile app GUI (Graphical User Interface) pages now contain rich visual information, with the visual semantics of each page helping users understand the application logic. However, these complex visual and functional logic present new challenges to software testing. Existing automated GUI testing methods, constrained by the lack of reliable testing oracles, are limited to detecting crash bugs with obvious abnormal signals. Consequently, many non-crash functional bugs, ranging from unexpected behaviors to logical errors, often evade detection by current techniques. While these non-crash functional bugs can exhibit visual cues that serve as potential testing oracles, they often entail a sequence of screenshots, and detecting them necessitates an understanding of the operational logic among GUI page transitions, which is challenging traditional techniques. Considering the remarkable performance of Multimodal Large Language Models (MLLM) in visual and language understanding, this paper proposes Trident, a novel vision-driven, multi-agent collaborative automated GUI testing approach for detecting non-crash functional bugs. It comprises three agents: Explorer, Monitor, and Detector, to guide the exploration, oversee the testing progress, and spot issues. We also address several challenges, i.e., align visual and textual information for MLLM input, achieve functionality-oriented exploration, and infer test oracles for non-crash bugs, to enhance the performance of functionality bug detection. We evaluate Trident on 590 non-crash bugs and compare it with 12 baselines, it can achieve more than 14%-112% and 108%-147% boost in average recall and precision compared with the best baseline. The ablation study further proves the contribution of each module. Moreover, Trident identifies 43 new bugs on Google Play, of which 31 have been fixed.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑