Skip to content
Back/Harness Engineering

AI-Driven E2E Testing

View in Graph
Updated 2026-09-21
1 min read
237 words

AI-Driven E2E Testing

AI-Driven E2E Testing 指让 AI 驱动端到端测试的两类实践:一是把测试矩阵当作结构化问题由 agent 系统探索(多框架 monorepo 场景),二是给编码 agent 定测试策略时把 E2E 提升为唯一默认机制并规定代码与测试的顺序。

What it is

Viking (@vikingmute) 在 TinyShip monorepo(Next.js、Nuxt.js、TanStack Start × PostgreSQL/SQLite)发展出可复现的五阶段工作流:Spec → Code → Verify → Test → Green。每个 feature 变更存在六种组合结果,人工测试无法覆盖,测试矩阵的组合爆炸是核心挑战。

Why it matters

传统人工 QA 的容量跟不上组合增长。AI 驱动 E2E 把测试从被动验证转为主动探索,同时也在改写"测试写在代码之后"的默认顺序。

Key points

  • 组合爆炸是核心挑战:TinyShip 每个 feature 6 种组合;此类问题增长速度超过人工 QA 容量
  • 模板化新 feature 开发:该工作流提供 E2E 驱动的 feature 开发模板,不只是测试执行
  • Agent-browser 替代人工 QA:系统性地导航应用并验证行为
  • 顺序规则(@anshnanda 的 AGENTS.md 铁律):
    • 写完代码后再补单元测试是被禁止的默认行为(agent 最常见的坏习惯)
    • 高度优先 E2E 作为唯一测试机制,在测试末尾产出可验证、可复现的 artifact
    • 如果必须隔离测试,先写出系统所有可能失败的方式,再写代码

Evidence across sources

Source Key Claim Relevance
AI 简报 2026-06-07 — TinyShip 案例 Spec→Code→Verify→Test→Green 五阶段工作流解决多框架组合爆炸 agent 作为测试执行与探索者
AI 简报 2026-09-21 Afternoon — @anshnanda 先写失败路径、E2E 为唯一机制、产出可复现 artifact agent 的测试纪律规范:顺序与验收标准

Open questions

  • Does this workflow generalize beyond monorepos to microservices or distributed systems?
  • How does the agent handle flaky tests or non-deterministic UI behavior?
  • What is the cost trade-off between agent-driven E2E testing and traditional automated test suites?

Prompts for witness

  • Where in your current projects is manual testing the bottleneck? Would a Spec→Code→Verify→Test→Green workflow help?
  • If you had to test six combinations for every feature change, what would you automate first?

Sources

Synthesized from 3 sources

Evolution

1 event
  1. absorbed

    Derived from source material

    This page is currently synthesized from 3 sources.

    From AI 简报 2026-06-08 Morning, 2026-09-21-22-20, 2026-09-21-22-20To AI-Driven E2E Testing
    Sources: raw/briefing/AI Briefing/2026-06-08-09-45.md · /Users/jean/Documents/Obsidian Vault/raw/briefing/AI Briefing/2026-09-21-22-20.md · raw/briefing/AI Briefing/2026-09-21-22-20.md

Linked from