arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.01024cs.SE
收藏

GenIA-E2ETest:一种基于生成式AI的端到端测试自动化方法

GenIA-E2ETest: A Generative AI-Based Approach for End-to-End Test Automation

Universidade Federal Fluminense(弗鲁米嫩塞联邦大学);Universidade Federal de São Carlos(圣卡洛斯联邦大学);Tecnologico de Monterrey(蒙特雷理工学院)

Elvis Júnior, Alan Valejo, Jorge Valverde-Rebaza, Vânia de Oliveira Neves

AI总结:

针对现有大语言模型测试生成方案多聚焦单元测试、难以覆盖端到端测试需求的问题,提出GenIA-E2ETest方法,可基于自然语言自动生成可执行端到端测试脚本,在两个Web应用上验证了其有效性,能减少人工工作量。

摘要:

软件测试是保障系统质量的关键环节,但人工测试仍存在耗时久、易出错的问题。尽管大语言模型(LLMs)的最新进展已实现测试用例的自动生成,现有方案大多聚焦于单元测试,未解决端到端(E2E)测试的难点——端到端测试用于验证从用户输入到系统最终响应的完整应用工作流。本文提出GenIA-E2ETest方法,利用生成式AI从自然语言描述中自动生成可执行的E2E测试脚本。我们在两个Web应用上评估了该方法,考察维度包括完整性、正确性、适配工作量和鲁棒性。结果令人鼓舞:生成脚本的两类元素指标平均达77%,执行精度为82%,执行召回率为85%,仅需极少人工调整(平均人工修改率为10%),且在典型Web场景中性能表现稳定。尽管观察到该方法对依赖上下文的导航和动态内容存在一定敏感性,但研究结果表明,GenIA-E2ETest是一种实用有效的解决方案,可加速基于自然语言的E2E测试自动化,减少人工工作量并降低自动化测试的使用门槛。

英文摘要:

Software testing is essential to ensure system quality, but it remains time-consuming and error-prone when performed manually. Although recent advances in Large Language Models (LLMs) have enabled automated test generation, most existing solutions focus on unit testing and do not address the challenges of end-to-end (E2E) testing, which validates complete application workflows from user input to final system response. This paper introduces GenIA-E2ETest, which leverages generative AI to generate executable E2E test scripts from natural language descriptions automatically. We evaluated the approach on two web applications, assessing completeness, correctness, adaptation effort, and robustness. Results were encouraging: the scripts achieved an average of 77% for both element metrics, 82% for precision of execution, 85% for execution recall, required minimal manual adjustments (average manual modification rate of 10%), and showed consistent performance in typical web scenarios. Although some sensitivity to context-dependent navigation and dynamic content was observed, the findings suggest that GenIA-E2ETest is a practical and effective solution to accelerate E2E test automation from natural language, reducing manual effort and broadening access to automated testing.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑