In the previous Radar, AI-powered UI testing primarily focused on exploratory testing, where we noted that the non-determinism of LLMs could introduce flakiness. With the rise of MCP, we’re now seeing major UI testing frameworks like Playwright and Selenium introduce their own MCP servers (playwright-mcp, mcp-selenium). These provide reliable browser automation through their native technologies, enabling coding assistants to generate reliable UI tests in Playwright or Selenium. While AI-powered UI testing remains a fast-evolving space — the latest Playwright release, for example, introduced Playwright Agents — we’re excited about those developments and look forward to seeing more practical guidance and field experience emerge.
AI 在软件团队中的应用正逐步超越单纯的代码生成,新的技术正在涌现。其中, AI 驱动的 UI 测试 正受到越来越多的关注,它利用 LLM 的能力来理解图形用户界面(GUI)。目前,该领域主要有几种不同的实现方式。一种方法是使用针对 UI 快照处理进行微调的多模态 LLM,这类工具允许测试脚本以自然语言编写,并能自主导航应用程序。例如,QA.tech 和 LambdaTest 的 KaneAI 就属于这一类别。另一种方法,则是像 Browser Use 这样,结合多模态基础模型与 Playwright,通过对网页结构的深入理解进行测试,而不是依赖于特定微调的模型。
在测试策略中引入 AI 驱动的 UI 测试时,需要考虑其价值所在。这些方法可以补充人工探索性测试。尽管 LLM 的非确定性特性可能会导致测试结果的不稳定性,但它的模糊匹配能力也可能成为优势,尤其适用于缺少选择器的遗留应用程序或经常变更标签和点击路径的应用。