arXiv:2506.02529cs.SEcs.AI2025-06被引 8

用大模型和页面跳转图自动生成网页测试用例。

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

  • 结合页面跳转图与大模型生成导航测试路径。
  • 通过状态图处理条件表单,自动生成Selenium脚本。
  • 适合需要自动化测试的开发团队快速上手。

现代软件生态中,网页应用至关重要,但其复杂性和动态性使其可靠性保障面临挑战。尽管大语言模型在自动化复杂任务方面展现出潜力,但在处理动态导航流程和复杂表单交互方面仍存在局限。本文提出一种自动化系统,用于生成网页应用测试的两大核心内容:站点导航和表单填写。针对站点导航,系统利用屏幕跳转图与大模型建模导航流并生成测试场景;针对表单填写,采用状态图处理条件性表单,并自动完成Selenium脚本生成。主要贡献包括:(1)首次将图结构与大模型融合用于导航测试;(2)基于状态图的表单填写测试用例自动化方法;(3)构建了一个用于评估表单交互测试的综合性数据集。实验表明,该系统显著提升了测试覆盖率与鲁棒性,推动了网页应用测试的自动化水平。

原文摘要 · Abstract (English)

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.

自动化测试大模型网页生成

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。