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

通过图像嵌入和强化学习实现有效且平台无关的 GUI 测试

Effective, Platform-Independent GUI Testing via Image Embedding and Reinforcement Learning

Shengcheng Yu, Chunrong Fang, Xin Li, Yuchen Ling, Zhenyu Chen, Zhendong Su

AI总结:

针对移动与 Web GUI 自动化测试依赖平台、覆盖率不足等问题,提出 PIRLTest,融合图像嵌入与强化学习,实现跨平台状态表示和好奇心驱动探索。

摘要:

软件应用在社会各方面发挥着越来越重要的作用。特别是移动应用和 Web 应用在所有应用中最为普遍,并广泛应用于各行业以及人们的日常生活中。为帮助确保移动和 Web 应用质量,许多方法已被提出,以通过自动化探索改进应用 GUI 测试。尽管已有大量努力,现有方法在实现高代码覆盖率、构建高质量模型以及普遍适用性方面仍然存在局限。基于强化学习的方法面临困难挑战,包括有效的应用状态抽象、奖励函数设计等。此外,它们严重依赖特定执行平台,从而导致泛化能力较差,无法适应不同平台。我们提出 PIRLTest,这是一种有效且平台无关的应用测试方法。它以新颖、协同的方式利用计算机视觉和强化学习技术进行自动化测试。该方法从 GUI 页面中提取 GUI 控件,并刻画相应的 GUI 布局,将 GUI 页面嵌入为状态。应用 GUI 状态结合了宏观视角和微观视角,并附加来自 GUI 图像的关键语义信息。这使 PIRLTest 能够实现平台无关,并使该测试方法普遍适用于不同平台。PIRLTest 在好奇心驱动策略的引导下探索应用,该策略使用 Q-network 估计特定状态-动作对的价值,以鼓励在无平台依赖的情况下对未覆盖页面进行更多探索。探索过程中的所有动作都会被赋予奖励,这些奖励在设计时同时考虑应用 GUI 状态和具体控件,以帮助框架探索更多未覆盖页面。

英文摘要:

Software applications have been playing an increasingly important role in various aspects of society. In particular, mobile apps and web apps are the most prevalent among all applications and are widely used in various industries as well as in people's daily lives. To help ensure mobile and web app quality, many approaches have been introduced to improve app GUI testing via automated exploration. Despite the extensive effort, existing approaches are still limited in reaching high code coverage, constructing high-quality models, and being generally applicable. Reinforcement learning-based approaches are faced with difficult challenges, including effective app state abstraction, reward function design, etc. Moreover, they heavily depend on the specific execution platforms, thus leading to poor generalizability and being unable to adapt to different platforms. We propose PIRLTest, an effective platform-independent approach for app testing. It utilizes computer vision and reinforcement learning techniques in a novel, synergistic manner for automated testing. It extracts the GUI widgets from GUI pages and characterizes the corresponding GUI layouts, embedding the GUI pages as states. The app GUI state combines the macroscopic perspective and the microscopic perspective, and attaches the critical semantic information from GUI images. This enables PIRLTest to be platform-independent and makes the testing approach generally applicable on different platforms. PIRLTest explores apps with the guidance of a curiosity-driven strategy, which uses a Q-network to estimate the values of specific state-action pairs to encourage more exploration in uncovered pages without platform dependency. The exploration will be assigned with rewards for all actions, which are designed considering both the app GUI states and the concrete widgets, to help the framework explore more uncovered pages.

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

↑