一句话:提出基于深度强化学习与图嵌入的 Android GUI 自动化测试方法 DQT,在代码覆盖与缺陷检测上优于现有方法。
随着 Android 应用规模与复杂度不断增长,质量保障面临更大挑战。已有研究表明强化学习(RL)在 Android GUI 测试中具有优势,但其效果在大型复杂应用上仍受限:表格型 RL 难以在被测应用巨大的状态-动作空间中学习知识,而采用更先进 RL 技术时又对已获得知识利用不足。为此,本文提出 DQT——一种基于深度强化学习的自动化 Android GUI 测试方法。DQT 利用图嵌入技术保留控件的结构与语义信息,为识别相似状态或动作、区分不同状态或动作奠定基础;同时设计专用的深度 Q 网络(DQN),通过与被测应用的运行时交互学习测试知识并在状态或动作间共享,从而有效引导好奇心驱动的探索。在 30 个多样化开源应用上的实验表明,DQT 在代码覆盖率与缺陷检测方面均优于现有最先进方法,对大型复杂应用尤为明显。DQT 发现的缺陷已被复现并报告给开发者,其中 21 个问题得到明确确认,14 个已被修复。
As the scale and complexity of Android applications continue to grow in response to increasing market and user demands, quality assurance challenges become more significant. While previous studies have demonstrated the superiority of Reinforcement Learning (RL) in Android GUI testing, its effectiveness remains limited, particularly in large, complex apps. This limitation arises from the ineffectiveness of Tabular RL in learning the knowledge within the large state-action space of the App Under Test (AUT) and from the suboptimal utilization of the acquired knowledge when employing more advanced RL techniques. To address such limitations, this paper presents DQT, a novel automated Android GUI testing approach based on deep reinforcement learning. DQT preserves widgets' structural and semantic information with graph embedding techniques, building a robust foundation for identifying similar states or actions and distinguishing different ones. Moreover, a specially designed Deep Q-Network (DQN) effectively guides curiosity-driven exploration by learning testing knowledge from runtime interactions with the AUT and sharing it across states or actions. Experiments conducted on 30 diverse open-source apps demonstrate that DQT outperforms existing state-of-the-art testing approaches in both code coverage and fault detection, particularly for large, complex apps. The faults detected by DQT have been reproduced and reported to developers; so far, 21 of the reported issues have been explicitly confirmed, and 14 have been fixed.
DOI 原文 ·
@inproceedings{paperbot11272,
title = {Deeply Reinforcing Android GUI Testing with Deep Reinforcement Learning},
author = {Yuanhong Lan and Yifei Lu and Zhong Li and Minxue Pan and Wenhua Yang and Tian Zhang and Xuandong Li},
booktitle = {ICSE},
year = {2024},
doi = {10.1145/3597503.3623344}
}