testi

Master's Thesis - Automated Test Case Generation for Web Applications Using Machine Learning

Information

Master's thesis on generating test cases for web applications. The thesis proposes a test generation framework for test automation libraries.

Algorithms implemented for test generation:
- Vanilla Policy Gradient (PG)
- Proximal Policy Optimization (PPO)
- Online Decision Transformer (ODT)

framework

Abstract

In recent years, web software development has gained significant prevalence. Consequently, the resources and costs required for verifying the functionality of web applications have also increased substantially. Thus, automation in the testing process, such as test case generation, enhances testing efficiency and reduces testing costs. Automatic test case generation employs gathered knowledge of the software to create test steps without direct control by a tester.

In web software development, test generation is challenging as applications frequently consist of multiple complex systems. Therefore, machine learning algorithms have been implemented in test case generation to replicate the manual testing traditionally performed by humans. Recent research has created test cases by exploring the application using search algorithms and directly converting the source code to test cases utilizing language processing. However, previous work has not suggested a generation framework for widely used test automation libraries and machine learning algorithms.

This thesis proposes a framework for transmitting information, such as visible elements and actions, between the machine learning algorithm and the software. For the framework, two machine learning algorithms, Proximal Policy Optimization (PPO) and Online Decision Transformer (ODT), are implemented to benchmark search-based test generation performance. The algorithms optimize test steps for achieving user-provided test objectives, such as logging into a website.

Results indicate that the framework can support the algorithms for exploration-based test generation for web applications. The PPO can optimize the test steps towards various test objectives. The ODT efficiently clones the behavior from collected trajectories, for example, previously created test cases. This thesis also analyzes solutions to address potential scalability challenges in the algorithms used, particularly as the number of available actions increases in larger applications. Furthermore, the future aim for these algorithms is simultaneous and rapid test case generation across multiple applications.

Thesis: https://www.rikulehtonen.fi/files/Lehtonen_2023.pdf

Archived project: https://github.com/rikulehtonen/Test-Case-Generation-Masters-Thesis