[Paper Review] DRIFT: Deep Reinforcement Learning for Functional Software Testing
DRIFT is a deep reinforcement learning framework that uses graph neural networks to model GUI state-action value functions from symbolic representations, enabling sample-efficient, automated functional testing of software. It outperforms random and hash-based baselines by two orders of magnitude and generalizes across multiple testing objectives on Windows 10.
Efficient software testing is essential for productive software development and reliable user experiences. As human testing is inefficient and expensive, automated software testing is needed. In this work, we propose a Reinforcement Learning (RL) framework for functional software testing named DRIFT. DRIFT operates on the symbolic representation of the user interface. It uses Q-learning through Batch-RL and models the state-action value function with a Graph Neural Network. We apply DRIFT to testing the Windows 10 operating system and show that DRIFT can robustly trigger the desired software functionality in a fully automated manner. Our experiments test the ability to perform single and combined tasks across different applications, demonstrating that our framework can efficiently test software with a large range of testing objectives.
Motivation & Objective
- To address the inefficiency and high cost of manual GUI testing in software development.
- To enable fully automated, sample-efficient testing of complex software systems with diverse objectives.
- To overcome limitations of fixed random policies and heuristic-based agents in GUI testing.
- To develop a generalizable framework that can test multiple functionalities without task-specific feature engineering.
- To improve test coverage and robustness compared to existing Q-learning and hash-based baselines.
Proposed method
- Formalizes software testing as a Markov Decision Process (MDP) with objectives defined via reward functions.
- Represents GUI states using tree-structured symbolic representations derived from accessibility APIs.
- Models the Q-function using a Graph Neural Network (GNN) to capture structural dependencies in GUI state.
- Trains the agent via Batch Reinforcement Learning using offline datasets, avoiding online interaction costs.
- Employs a DRIFT-Sampler to enable multi-objective learning by stochastic sampling of target tasks during inference.
- Uses a Q-learning algorithm with GNN-based function approximation to learn optimal policies from historical interaction data.
Experimental results
Research questions
- RQ1Can a deep reinforcement learning agent learn to perform functional GUI testing without human-specified features?
- RQ2Does using a GNN to model GUI state-action values improve generalization compared to hash-based methods?
- RQ3Can the framework efficiently learn multiple testing objectives simultaneously with a single agent?
- RQ4How does the sample efficiency of DRIFT compare to random and heuristic-based testing baselines?
- RQ5Can the agent generalize to small GUI variations that break traditional hash-based testing approaches?
Key findings
- DRIFT outperformed a random baseline by two orders of magnitude in test completion rate on Windows 10.
- The GNN-based model generalized effectively to small GUI variations, whereas the Q-hash baseline failed to generalize.
- The agent successfully completed both the Notifications and Bluetooth device setup tasks in the Settings app, with 21 successful completions of the Bluetooth task using a temperature of 0.03.
- The framework demonstrated robustness in multi-objective testing by sampling from different objectives during inference.
- Batch RL training from offline data enabled efficient learning without requiring online environment interaction during training.
- The agent learned to prioritize critical UI elements, improving coverage compared to random or heuristic policies.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.