arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2601.06034cs.SEcs.AI
收藏

自主问答代理:一种增强检索的框架,用于可靠的Selenium脚本生成

Autonomous QA Agent: A Retrieval-Augmented Framework for Reliable Selenium Script Generation

Department of Computer Science(计算机科学系);VIT-AP University(VIT-AP大学)

Dudekula Kasim Vali

AI总结:

本文提出了一种基于增强检索的框架,通过项目文档和HTML结构生成可靠的Selenium测试脚本,显著提高了脚本生成的准确性和执行成功率。

摘要:

软件测试在软件开发生命周期中至关重要,但将需求转化为可执行的测试脚本仍需手动操作且容易出错。尽管大语言模型(LLMs)可以生成代码,但它们常常会产生不存在的UI元素。我们提出了自主问答代理,一种增强检索的生成(RAG)系统,该系统将Selenium脚本生成建立在项目特定的文档和HTML结构之上。通过将多种格式(Markdown、PDF、HTML)输入向量数据库,我们的系统在生成前检索相关上下文。在20个电子商务测试场景上的评估显示,我们的RAG方法实现了100%(20/20)的语法有效性以及90%(18/20,95%置信区间:[85%,95%],p < 0.001)的执行成功率,相较于标准LLM生成的30%。尽管我们的评估仅限于单一领域,但我们的方法通过将生成建立在实际DOM结构上显著减少了幻觉,展示了RAG在自动化UI测试中的潜力。

英文摘要:

Software testing is critical in the software development lifecycle, yet translating requirements into executable test scripts remains manual and error-prone. While Large Language Models (LLMs) can generate code, they often hallucinate non-existent UI elements. We present the Autonomous QA Agent, a Retrieval-Augmented Generation (RAG) system that grounds Selenium script generation in project-specific documentation and HTML structure. By ingesting diverse formats (Markdown, PDF, HTML) into a vector database, our system retrieves relevant context before generation. Evaluation on 20 e-commerce test scenarios shows our RAG approach achieves 100% (20/20) syntax validity and 90% (18/20, 95% CI: [85%, 95%], p < 0.001) execution success, compared to 30% for standard LLM generation. While our evaluation is limited to a single domain, our method significantly reduces hallucinations by grounding generation in actual DOM structure, demonstrating RAG's potential for automated UI testing.

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

↑