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.
翻译:Web应用是现代软件生态系统的关键组成部分,然而由于其界面的复杂性和动态特性,确保其可靠性仍具挑战性。大语言模型(LLMs)的最新进展在自动化复杂任务方面展现出潜力,但在处理动态导航流和复杂表单交互方面仍存在局限。本文提出了一种自动化系统,用于生成Web应用测试中两个关键方面的测试用例:站点导航和表单填写。针对站点导航,该系统采用屏幕转换图与LLMs对导航流进行建模并生成测试场景。针对表单填写,系统利用状态图处理条件表单并自动化生成Selenium脚本。主要贡献包括:(1)首次将图结构与LLMs相结合用于站点导航测试;(2)提出基于状态图的表单填写测试用例自动化方法;(3)构建用于评估表单交互测试的综合性数据集。实验结果表明,该系统在提升测试覆盖率和鲁棒性方面具有显著效果,推动了Web应用测试领域的发展。