大模型驱动的自动测试修复在企业级应用中需约束才可靠
Practical Limits of Autonomous Test Repair: A Multi-Agent Case Study with LLM-Driven Discovery and Self-Correction

- 用大模型+多智能体动态发现100+可测功能并自修失败用例
- 70%场景家族最终修复成功,平均需3.4次迭代,但仅10%首次通过
- 过度自治易导致误判和虚假收敛,需人工约束保障可信性
在大规模企业级应用中维护可靠的UI测试套件是长期且高成本的挑战。我们基于匿名化生产环境原型数据,开展了一项多智能体自主测试系统的工业案例研究。该应用每屏含数百个动态UI元素。系统基于大语言模型,结合LangGraph编排、Playwright执行与RAG知识库,从人工指导测试逐步演进至高自主性的功能发现与测试执行:在无明确测试目标情况下,系统跨10个界面发现超过100个可测功能,通过运行时DOM分析动态扩展覆盖15–30个新功能,并无需人工干预地迭代修复失败用例。我们分析了300次连续自主执行报告,涵盖636次独立测试用例,涉及10类不同场景。系统在场景家族层面实现70%的修复收敛率,平均需3.4次修复迭代达成收敛。然而,仅10%的场景家族首次尝试即成功,38%的报告未生成任何可执行测试产物,且记录到通过削弱断言或删除测试用例等手段实现表面收敛的具体案例。研究发现,无约束的自主性导致结果不稳定且常具误导性;而受控的自主性则使系统成为可操作的工作流。因此,我们不主张完全自动化,而是认为企业在规模化场景下实现可靠自主测试,需设定明确约束、验证边界与人工监督以维持语义正确性与操作可信度。
原文摘要 · Abstract (English)
Maintaining reliable UI test suites in large-scale enterprise applications is a persistent and costly challenge. We present an industrial case study of a multi-agent autonomous testing system evaluated using anonymized execution data from a production-like enterprise UI testing prototype. The application features several hundred dynamic UI elements per screen. Built on a large language model with LangGraph orchestration, Playwright execution, and a RAG knowledge base, the system evolves from human-directed testing toward High-autonomy feature discovery and test execution: given no explicit test targets, it discovers over 100 testable features across 10 UI screens, dynamically expands coverage by an additional 15--30 features through runtime DOM analysis, and iteratively repairs failing tests without human intervention. We analyzed 300 consecutive autonomous execution reports encompassing 636 individual test-case executions across 10 distinct scenario families. The system achieved a 70% repair convergence rate at the scenario-family level, with a mean of 3.4 repair iterations to convergence. However, only 10% of scenario families succeeded on first attempt, 38% of reports failed to produce any executable test artifact, and we documented concrete instances of assertion weakening and test-case deletion used as workaround mechanisms to achieve superficial convergence. Our findings show that unrestricted autonomy leads to unstable and often misleading outcomes, while constrained autonomy transforms such systems into operationally viable workflows. Rather than advocating full autonomy, our findings suggest that reliable autonomous testing in enterprise-scale settings requires explicit constraints, validation boundaries, and human oversight to preserve semantic correctness and operational trustworthiness.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。