Automated Web Application Testing: End-to-End Test Case Generation with Large Language Models and Screen Transition Graphs

Nguyen-Khang Le ∗1, Quan Minh Bui ∗2, Minh Ngoc Nguyen ∗1, Hiep Nguyen ∗1, Trung Vo ∗1, Son T. Luu ∗1, Shoshin Nomura ∗2, Minh Le Nguyen ∗1 · 2025

Read Automated Web Application Testing: End-to-End Test Case Generation with Large Language Models and Screen Transition Graphs by Nguyen-Khang Le ∗1, Quan Minh Bui ∗2, Minh Ngoc Nguyen ∗1, Hiep Nguyen ∗1, Trung Vo ∗1, Son T. Luu ∗1, Shoshin Nomura ∗2, Minh Le Nguyen ∗1 (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2506-02529.txt.

Introduction

Nguyen-Khang Le and co-authors present a 2025 system that writes end-to-end tests for web apps with language models. Web apps are vital but hard to test, since screens change and forms branch. Language models help, yet they stumble on shifting navigation flows. The system pairs the models with screen transition graphs.

For navigation, the graph maps how screens link, and the model drafts test scenarios from it. For forms, a state graph handles conditional fields. The system then writes Selenium scripts that run the tests in a browser. The goal is full test cases with little human effort. Such tools could raise software quality while cutting tester workload.

Catalog record

CREATORNguyen-Khang Le ∗1, Quan Minh Bui ∗2, Minh Ngoc Nguyen ∗1, Hiep Nguyen ∗1, Trung Vo ∗1, Son T. Luu ∗1, Shoshin Nomura ∗2, Minh Le Nguyen ∗1
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE26 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2506-02529

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Automated Web Application Testing: End-to-End Test Case Generation with Large Language Models and Screen Transition Graphs Nguyen-Khang Le ∗1, Quan Minh Bui ∗2, Minh Ngoc Nguyen ∗1, Hiep Nguyen ∗1, Trung Vo ∗1, Son T. Luu ∗1, Shoshin Nomura ∗2, Minh Le Nguyen ∗1 Abstract Web applications are critical to modern software ecosystems, yet ensuring their reliability remains challenging due to the complexity and dynamic nature of web interfaces. Recent advances in large language models (LLMs) have shown promise in automating complex tasks, but limitations persist in handling dynamic navigation flows and complex form interactions. This paper presents an automated system for generating test cases for two key aspects of web application testing: site navigation and form filling. For site navigation, the system employs screen transition graphs and LLMs to model navigation flows and generate test scenarios. For form filling, it uses state graphs to handle conditional forms and automates Selenium script generation. Key contributions include: (1) a novel integration of graph structures and LLMs for site navigation testing, (2) a state graph-based approach for automating form-filling test cases, and (3) a comprehensive dataset for evaluating form-interaction testing. Experimental results demonstrate the system’s effectiveness in improving test coverage and robustness, advancing the state of web application testing. 1. Introduction Web applications are integral to modern software ecosystems, powering diverse services ranging from e-commerce to social networking. Ensuring their reliability and functionality is paramount, as users expect seamless operation under varying conditions. However, the complexity and dynamic nature of web interfaces make manual testing a significant bottleneck. This has spurred the need for scalable and automated testing solutions, driving research into novel methodologies for web application testing. Traditional testing approaches, such as static and dynamic analysis techniques, have been foundational in identifying vulnerabilities and ensuring functionality. Early work [ 1 ] emphasized the importance of comprehensive analysis techniques, while subsequent studies [ 2 ] introduced systematic test generation methods to improve coverage. More recent advancements have focused on automated frameworks that leverage pre-recorded test cases to reduce human intervention [ 3 ] . Despite these efforts, traditional methods struggle to scale to large, interactive web applications, often resulting in gaps in test coverage and undetected vulnerabilities. Existing automated tools, such as Selenium, enable programmatic interaction with web elements but typically require manually generated test cases. This process is time-consuming, error-prone, and ill-suited for dynamic web environments. To address these limitations, researchers have explored generative AI techniques for test case creation. For instance, [ 4 ] proposed an adaptive approach where AI models dynamically generate test cases in response to application changes, improving coverage and robustness. However, significant challenges remain, particularly in handling dynamic navigation flows and complex form interactions. Figure 1: Overview of the test generation process, focusing on two types of tests: Navigation tests and form action tests. The advent of large language models (LLMs), such as ChatGPT and GPT-4 [ 5 ] , has opened new avenues for automating complex tasks. Researchers have developed LLM-based autonomous agents [ 6 ] capable of executing intricate workflows [ 7 , 8 ] . In the context of web testing, recent studies have explored text-based web browsing environments and instructed LLM agents to perform web navigation [ 9 , 10 , 11 , 12 ] . A key challenge in these works is managing complex and verbose HTML structures, with solutions including HTML simplification and structuring [ 9 , 11 , 10 , 13 ] . Notably, [ 14 ] introduced WebVoyager, an end-to-end automated web testing framework employing multimodal LLMs to interact with real-world websites. Despite these advancements, existing methods face critical limitations. Many approaches struggle to model dynamic navigation flows effectively, leading to incomplete coverage of critical user pathways. Additionally, handling complex form interactions—such as conditional fields that appear based on prior inputs or mandatory fields requiring specific validation logic—remains a significant challenge. Furthermore, current systems often treat navigation modeling and form validation as separate processes, lacking a unified workflow to address these interconnected aspects of web testing. Two of the most common and critical actions in web applications are site navigation (moving between pages) and form filling (interacting with input fields). These actions are fundamental to user experience and functionality, yet they pose unique challenges for automated testing. This paper addresses these challenges by presenting an automated system designed to generate test cases for site navigation and form filling. For site navigation, the system employs screen transition graphs to model navigation flows between web pages, enabling the generation of comprehensive test cases. For form filling, the system integrates a state graph to handle complex form-filling scenarios and automates the generation of Selenium scripts. Together, these components provide a scalable and efficient solution for web application testing. The key contributions of this work are as follows: • A novel approach leveraging graph structures to model screen transition graphs , combined with large language models (LLMs) for automated test scenario generation in site navigation. • A novel methodology utilizing state graphs to model potential state changes in complex conditional forms, integrated with LLMs to generate high-quality Selenium test cases. • The development of a comprehensive dataset for evaluating form-interaction testing, facilitating robust benchmarking and validation of the proposed system. 2. Related Work Testing web applications is a critical yet time-intensive task in software development. Over the years, various approaches have been explored to streamline this process. Early research in web application testing focused on static and dynamic analysis techniques to identify vulnerabilities and ensure functionality. For instance, [ 1 ] emphasized the importance of comprehensive analysis techniques for testing web systems, while [ 2 ] introduced systematic test generation methods aimed at improving test coverage. Recent advancements have introduced innovative methods for automating web application testing. Tools like Selenium have been pivotal in enabling programmatic interaction with web elements. However, these tools often require manually generated test cases, which are time-consuming and error-prone. To address this, [ 15 ] provided a comprehensive survey highlighting the challenges and potential solutions for web application testing, setting the stage for subsequent research. More recently, researchers have proposed automated frameworks driven by pre-recorded test cases, significantly reducing human intervention. For instance, [ 3 ] demonstrated a framework that utilizes recorded user interactions to automatically generate reusable test scripts. This approach not only reduces manual effort but also enhances test efficiency. Another promising avenue involves leveraging generative AI for automated test case creation. [ 4 ] presented a methodology where AI models adaptively generate test cases in response to changes in web applications. This dynamic approach improves testing comprehensiveness and ensures robustness against application updates. Additionally, [ 14 ] introduced WebVoyager, an end-to-end automated web testing framework that employs multimodal large language models (LLMs) as agents to interact with real-world websites. Despite these advancements, significant limitations remain in existing methods. First, many approaches struggle to effectively handle dynamic navigation flows, which are a common feature of modern web applications. This often results in incomplete coverage of critical user pathways. Second, existing solutions frequently fail to address the complexities of advanced form interactions, such as conditional fields that appear based on prior inputs or mandatory fields requiring specific validation logic. These limitations reduce the robustness and reliability

Read the complete text