一句话:提出 Q-testing,用好奇心驱动的强化学习结合记忆集与神经网络状态比较模块,提升 Android GUI 测试的覆盖率与缺陷检测能力。
Android GUI 测试中,基于模型和系统化的方法因模型不精确、可扩展性差等局限,未能显著优于随机方法。本文提出 Q-testing,一种兼取随机方法与基于模型方法之长的强化学习自动化测试方法。Q-testing 采用好奇心驱动策略探索 Android 应用:用记忆集记录部分已访问状态,引导测试走向不熟悉的功能;并新颖地引入状态比较模块——一个由大量收集样本训练的神经网络——在功能场景粒度上区分不同状态,从而确定强化学习奖励并帮助好奇心策略高效探索不同功能。作者在 50 个开源应用上开展实验,Q-testing 在代码覆盖率和缺陷检测方面均优于最先进及业界实践的 Android GUI 测试工具;目前报告的缺陷中有 22 个已获确认,其中 7 个已修复。
Mobile applications play an important role in our daily life, while it still remains a challenge to guarantee their correctness. Model-based and systematic approaches have been applied to Android GUI testing. However, they do not show significant advantages over random approaches because of limitations such as imprecise models and poor scalability. In this paper, we propose Q-testing, a reinforcement learning based approach which benefits from both random and model-based approaches to automated testing of Android applications. Q-testing explores the Android apps with a curiosity-driven strategy that utilizes a memory set to record part of previously visited states and guides the testing towards unfamiliar functionalities. A state comparison module, which is a neural network trained by plenty of collected samples, is novelly employed to divide different states at the granularity of functional scenarios. It can determine the reinforcement learning reward in Q-testing and help the curiosity-driven strategy explore different functionalities efficiently. We conduct experiments on 50 open-source applications where Q-testing outperforms the state-of-the-art and state-of-practice Android GUI testing tools in terms of code coverage and fault detection. So far, 22 of our reported faults have been confirmed, among which 7 have been fixed.
DOI 原文 ·
@inproceedings{paperbot6065,
title = {Reinforcement learning based curiosity-driven testing of Android applications},
author = {Minxue Pan and An Huang and Guoxin Wang and Tian Zhang and Xuandong Li},
booktitle = {ISSTA},
year = {2020},
doi = {10.1145/3395363.3397354}
}