Table of Contents
Fetching ...

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

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

TL;DR

This work tackles the challenge of cross-platform GUI testing by removing reliance on platform-specific GUI representations. It introduces PIRLTest, which embeds GUI states through a combination of widget-level visual features and macroscopic layout trees, and drives exploration with a curiosity-guided DQN. The approach achieves substantial gains in code coverage and bug detection on both mobile and web apps, outperforming a wide range of baselines and enabling zero-cost adaptation across platforms. The results demonstrate PIRLTest’s potential to enhance GUI quality assurance in heterogeneous environments and motivate further integration with human insights and additional platforms.

Abstract

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.

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

TL;DR

This work tackles the challenge of cross-platform GUI testing by removing reliance on platform-specific GUI representations. It introduces PIRLTest, which embeds GUI states through a combination of widget-level visual features and macroscopic layout trees, and drives exploration with a curiosity-guided DQN. The approach achieves substantial gains in code coverage and bug detection on both mobile and web apps, outperforming a wide range of baselines and enabling zero-cost adaptation across platforms. The results demonstrate PIRLTest’s potential to enhance GUI quality assurance in heterogeneous environments and motivate further integration with human insights and additional platforms.

Abstract

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.
Paper Structure (32 sections, 4 equations, 8 figures, 5 tables)

This paper contains 32 sections, 4 equations, 8 figures, 5 tables.

Figures (8)

  • Figure 1: Markov Decision Process (MDP)
  • Figure 2: Examples of the limitations of current approaches (mobile and web apps)
  • Figure 3: PIRLTest Framework
  • Figure 4: Layout Characterization of App GUI
  • Figure 5: Layout Embedding of App GUI
  • ...and 3 more figures