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

用于Web自动化测试的带验证与恢复的步对齐脚本生成

Step-Aligned Script Generation with Verification and Recovery for Web Automation Testing

The University of Texas at Dallas(德克萨斯大学达拉斯分校);The University of Central Florida(中佛罗里达大学)

Hridya Dhulipala, Xiaokai Rong, Aashish Yadavally, Tien N. Nguyen

AI总结:

本研究提出TESSARA框架,通过步对齐脚本(SAS)结合三级验证流水线,将自然语言测试意图转换为Playwright脚本,在Web自动化测试的多个指标上较基线模型有显著提升。

摘要:

生成端到端Web测试的自动化工作仍成本高昂:开发者必须识别稳定的选择器、编码多步骤工作流、附加断言,并在接口演变时维护脚本。近期基于大语言模型(LLM)的Web智能体可在实时浏览器会话中完成自然语言任务,但任务完成与生成测试工件(可执行、可从重置状态重放、开发者可检查且关联预言机的代码)并非同一回事。我们提出TESSARA,一种自适应测试脚本生成框架,它将自然语言测试意图转换为Playwright脚本,该脚本包含可执行交互代码、目标状态断言,以及将每个步骤与其生成的代码片段、选择器证据、执行结果和修复历史关联的步骤级来源。TESSARA通过步对齐脚本(SAS)为每个计划步骤提供基础,支持细粒度故障定位、对失败后缀的选择性重新生成,以及可感知可逆性的回溯,避免撤销可能的提交点(如表单提交)。一个三级验证流水线(语法、执行和语义/预言机)可检测并修复格式错误的代码、交互故障和不正确的着陆状态。我们在三个公开Web基准上评估TESSARA,测量脚本可执行性、预言机满意度、重放稳定性和修复效率,结果显示其相较于基线和直接用作脚本生成器的底层视觉语言模型(VLM)有显著提升。

英文摘要:

Automated generation of end-to-end web tests remains costly: developers must identify stable selectors, encode multi-step workflows, attach assertions, and maintain scripts as interfaces evolve. Recent LLM-based web agents can complete natural-language tasks in a live browser session, but task completion is not the same as producing a test-ware artifact - code that is executable, replay-able from a reset state, inspectable by developers, and tied to an oracle. We present TESSARA, an adaptive test-script generation framework that converts natural-language test intent into Playwright scripts consisting of executable interaction code, goal-state assertions, and step-level provenance linking each step to its generated code fragment, selector evidence, execution outcome, and repair history. TESSARA grounds each planned step via Step-Aligned Scripting (SAS), enabling fine-grained failure localization, selective regeneration of failing suffixes, and reversibility-aware backtracking that avoids undoing likely commit points (e.g., form submissions). A three-level verification pipeline (syntactic, execution, and semantic/oracle), detects and repairs malformed code, interaction failures, and incorrect landing states. We evaluate TESSARA on three public web benchmarks, measuring script executability, oracle satisfaction, replay stability, and repair efficiency, and show substantial improvements over baselines and underlying VLMs used directly as script generators.

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

↑