[论文解读] A Deep Learning based Approach to Automated Android App Testing.
本文提出 Humanoid,一种基于深度学习的方法,通过从用户界面追踪中学习类人交互模式,为 Android 应用生成高效的测试输入。通过利用视觉界面特征和状态转换,Humanoid 在比最先进的随机或暴力生成器更快的速度下实现了更高的测试覆盖率。
Automated input generators are widely used for large-scale dynamic analysis and testing of mobile apps. Such input generators must constantly choose which UI element to interact with and how to interact with it, in order to achieve high coverage with a limited time budget. Currently, most input generators adopt pseudo-random or brute-force searching strategies, which may take very long to find the correct combination of inputs that can drive the app into new and important states. In this paper, we propose Humanoid, a deep learning-based approach to automated Android app testing. Our insight is that if we can learn from human-generated interaction traces, it is possible to generate human-like test inputs based on the visual information in the current UI state and the latest state transitions. We design and implement a deep neural network model to learn how end-users would interact with an app (specifically, which UI elements to interact with and how), and show that we can successfully generate human-like inputs for any new UI based on the learned model. We then apply the model to automated testing of Android apps and demonstrate that it is able to reach higher coverage, and faster as well, than the state-of-the-art test input generators.
研究动机与目标
- 解决当前伪随机或暴力输入生成策略在 Android 应用测试中的低效问题。
- 从人工生成的用户界面交互追踪中学习用户交互模式,以改进测试输入的生成。
- 开发一个基于视觉状态和近期转换预测最优用户界面交互的模型。
- 评估所学模型是否能泛化到新用户界面,并提升测试覆盖率和效率。
提出的方法
- 设计一个深度神经网络,以当前用户界面的视觉表示和近期状态转换作为输入。
- 在人工交互追踪上训练模型,以预测应与哪个用户界面元素交互以及交互类型(例如,点击、输入)。
- 使用用户界面的视觉嵌入表示当前状态,从而实现对未见过的用户界面布局的泛化。
- 利用交互序列中的时间依赖性,建模随时间变化的用户行为模式。
- 在新 Android 应用的自动化测试过程中,应用训练好的模型生成测试输入。
- 使用标准覆盖率指标和执行时间与基线生成器对比评估性能。
实验结果
研究问题
- RQ1在人类交互追踪上训练的深度学习模型,能否有效预测新 Android 应用状态下的有意义用户界面交互?
- RQ2该模型生成的测试输入策略是否能实现比随机或暴力方法更高的代码覆盖率?
- RQ3在覆盖率速度和完整性方面,该模型的性能与最先进的输入生成器相比如何?
- RQ4该模型在训练期间未见过的新用户界面布局上的泛化能力有多强?
主要发现
- 在相同时间预算下,Humanoid 实现的代码覆盖率显著高于现有输入生成器。
- 该模型通过从人类追踪中学习高效的导航模式,减少了达到高覆盖率所需的时间。
- 该方法在新用户界面中表现出良好的泛化能力,展示了在多样化应用界面中的鲁棒性。
- 利用视觉和序列状态信息,能够在无需应用源代码的情况下,准确预测类人交互。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。