2022 - 2023

Automated Web Application Testing Using Deep Reinforcement Learning

Graphical User Interface (GUI) testing, despite its time-consuming nature, remains a dominantly manual task due to the combinatorial complexity and infinite unique states posed by user inputs. This thesis presents a novel approach to tackle this challenge by proposing an autonomous reinforcement learning (RL) agent designed to mimic a human tester. The agent learns to interact with a web application’s GUI, thereby uncovering potential bugs and faults in the interface. The system uses the SoActor-Critic algorithm and is trained solely on GUI screenshots and a reward signal, allowing it to iteratively learn a policy for effective exploration of the GUI. On average, the proposed system outperforms a Q-learning baseline by 91% and inexperienced human testers by 67% while approaching the ability of expert human testers in certain web apps. Additionally, the system demonstrated remarkable generalisability across different types of web applications and showed the efficacy of transfer learning. This enabled the setup of a custom web app testing agent within just one hour of training on a conventional laptop. By bypassing the need for time-consuming setup and maintenance of pre-defined test cases, this strategy significantly enhances the efficiency of automated GUI testing. The full project repository, including a standard OpenAI Gymnasium environment, is made publicly available as a supplementary outcome to facilitate reproduction and further research of autonomous web app testing.