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

Humanoid:一种基于深度学习的自动化黑盒Android应用测试方法

Humanoid: A Deep Learning-based Approach to Automated Black-box Android App Testing

Yuanchun Li, Ziyue Yang, Yao Guo, Xiangqun Chen

摘要:

自动输入生成器广泛用于移动应用程序的大规模动态分析。这样的输入生成器必须不断地选择与哪个UI元素交互以及如何与它交互,以便在有限的时间预算内实现高覆盖率。目前,大多数输入生成器采用伪随机或蛮力搜索策略,这可能需要很长时间才能找到正确的输入组合,从而将应用程序驱动到新的重要状态。在本文中,我们提出了Humanoid,一种基于深度学习的方法,通过从人类交互中学习来生成GUI测试输入。我们的观点是,如果我们可以从人类生成的交互痕迹中学习,就有可能根据用户感知的重要性自动对测试输入进行优先级排序。我们设计并实现了一个深度神经网络模型,以了解最终用户如何与应用程序交互(具体来说,与哪些UI元素交互以及如何交互)。我们的实验表明,交互模型可以成功地优先考虑任何新UI的用户首选输入(前1名的准确率为51.2%,前10名的准确率为85.2%)。我们基于学习的模型为Android应用程序实现了一个输入生成器,并在开源应用程序和市场应用程序上对其进行了评估。结果表明,Humanoid能够实现比六个最先进的测试生成器更高的覆盖率。然而,进一步的分析表明,学习模型不是覆盖率提高的主要原因。虽然学习的交互模式可以以更高的概率驱动应用进入一些重要的GUI状态,但它对GUI状态搜索的宽度和深度的影响有限,这是长期提高测试覆盖率的关键。是否以及如何使用人类交互模式来提高覆盖率仍然是一个未知且具有挑战性的问题。

英文摘要:

Automated input generators are widely used for large-scale dynamic analysis 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 GUI test input generation by learning from human interactions. Our insight is that if we can learn from human-generated interaction traces, it is possible to automatically prioritize test inputs based on their importance as perceived by users. 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). Our experiments showed that the interaction model can successfully prioritize user-preferred inputs for any new UI (with a top-1 accuracy of 51.2% and a top-10 accuracy of 85.2%). We implemented an input generator for Android apps based on the learned model and evaluated it on both open-source apps and market apps. The results indicated that Humanoid was able to achieve higher coverage than six state-of-the-art test generators. However, further analysis showed that the learned model was not the main reason of coverage improvement. Although the learned interaction pattern could drive the app into some important GUI states with higher probabilities, it had limited effect on the width and depth of GUI state search, which is the key to improve test coverage in the long term. Whether and how human interaction patterns can be used to improve coverage is still an unknown and challenging problem.

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

↑