用自然语言驱动的AI Agent自动执行网页测试并保障安全,成功率超90%。
Autonomous Intelligent Agents for Natural-Language-Driven Web Execution with Integrated Security Assurance
- 基于自然语言指令自动生成可靠测试脚本,集成导航、选择器生成等五项策略。
- 测试成功率从55%提升至93%,导航失败减少8倍,时序问题减少80%。
- 支持用中文描述攻击场景,自动检测认证绕过与输入漏洞,适合安全测试人员。
现代网页测试套件易失效:界面重构导致定位器失效,时间变化引发竞态条件,数周内开发人员即放弃使用。本文提出一种AI驱动的自主测试框架,通过五项集成策略——导航可靠性、上下文感知选择器生成、生成后验证、智能等待注入、失败学习——在容器化工作节点架构上实现测试编排与浏览器执行解耦。在四个生产应用、176个场景中评估,脚本生成成功率由55%提升至93%,导航失败减少8倍,80%的时序相关竞态条件被消除,测试创建时间相比手动Selenium编写减少75%。该框架可自然扩展至安全验证:测试人员用自然语言描述攻击场景(如“尝试访问其他用户的发票”),代理自动转化为符合OWASP Top 10标准的浏览器探测,以低于12%的误报率,检测出85%的认证绕过漏洞和95%的输入验证缺陷。据我们所知,这是该领域首次实现自然语言驱动的安全测试。
原文摘要 · Abstract (English)
Modern web test suites rot. A UI refactor breaks locators, a timing change causes race conditions, and within weeks developers abandon the suite entirely. This paper presents an AI-driven autonomous testing framework that addresses these failure modes through five integrated strategies - navigation reliability, context-aware selector generation, post-generation validation, smart wait injection, and failure learning - implemented over a containerised worker architecture that decouples orchestration from long-running browser execution. Evaluated across four production applications and 176 scenarios, the framework improves script generation success from 55% to 93%, achieves an 8x reduction in navigation failures, eliminates 80% of timing-related race conditions, and reduces test creation time by 75% compared to manual Selenium authoring. The framework extends naturally to security validation: testers describe attack scenarios in plain English - "try accessing another user's invoice" - which the agent converts to OWASP Top 10-aligned browser probes, detecting 85% of authentication bypass vulnerabilities and 95% of input validation flaws with false positive rates below 12%. Natural-language-driven security testing of this kind represents, to our knowledge, a novel contribution to the field.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。