Test Execution
Goal
Execute confirmed test cases and record evidence by priority.
Required Inputs
- Confirmed module artifact directory.
- Readable
01-04 planning artifacts.
- Final execution plan from
execution-gate.
- Confirmed risk boundary.
- Runtime dependency check result from
execution-gate, including downgrade strategy for unavailable optional dependencies.
Execution Modes
Single-agent mode:
- Execute
P0 -> P1 -> P2 -> P3.
- Write each priority result to its own
执行结果/Px/ directory.
- Each priority directory must contain priority-owned
05-执行记录.md and 06-缺陷记录.md, plus screenshots/, videos/, and scripts/.
Multi-agent mode:
- Dispatch by priority only.
- A child agent writes only its assigned
执行结果/Px/ directory.
- Each assigned priority directory must contain priority-owned
05-执行记录.md and 06-缺陷记录.md, plus screenshots/, videos/, and scripts/.
- Child agents do not modify
01-04.
- Child agents do not write root
05-执行记录.md or 06-缺陷记录.md.
Priority Directory Contract
For every executed priority, use this structure:
执行结果/Px/
执行结果/Px/05-执行记录.md
执行结果/Px/06-缺陷记录.md
执行结果/Px/screenshots/
执行结果/Px/videos/
执行结果/Px/scripts/
Root 05-执行记录.md and 06-缺陷记录.md are generated by result-aggregation from these priority-owned files.
First-Run Browser Protocol
Before the first browser navigation for each page or key flow, read and apply browser-execution-protocol.md. Use it again when a browser recheck enters an unknown page state.
- Match reconnaissance to static HTML or a dynamic application.
- Complete the enter, readiness, reconnaissance, locator, action, assertion, classification, evidence, and cleanup loop.
- Keep observable readiness conditions, runtime observation, locator risk, and resource ownership explicit in the priority execution record.
- Preserve the backend and diagnostic escalation rules below; the protocol standardizes execution behavior and does not replace the confirmed backend.
Evidence Rules
- Passing cases need a result summary and do not require screenshots.
- Field differences require screenshots.
- Operation failures require an actual-result summary and a screenshot when feasible. Record Console, Network, Playwright video, Trace, or HAR evidence only when the selected backend actually produced it; otherwise record
未产生(原因) and the resulting evidence gap.
- Missing account, permission, data, environment, or dependency is recorded as
阻塞.
- Blockers are not defects unless the user confirms they are product or implementation issues.
Diagnostic Escalation
Escalate from agent-browser to Chrome DevTools CLI only when one of these conditions occurs:
- Console runtime error or white screen.
- Key request returns 4xx, 5xx, timeout, CORS, blocked, or redirect loop.
- Page load or key interaction exceeds the confirmed threshold.
- UI, API, local storage, or session state appears inconsistent.
- Upload, drag-and-drop, iframe, shadow DOM, canvas, map, chart, or rich text editor interaction fails.
- Current evidence is insufficient to write a reproducible defect.
Escalate from Chrome DevTools CLI to Chrome DevTools MCP only when CLI output cannot complete the diagnosis.
Execution Backend Rules
Default backend:
- Use
agent-browser for first-run browser execution.
- Use priority-isolated browser sessions in multi-agent mode, such as
AGENT_BROWSER_SESSION=P0, AGENT_BROWSER_SESSION=P1, AGENT_BROWSER_SESSION=P2, and AGENT_BROWSER_SESSION=P3.
- Prefer batch execution and concise command output.
- Store screenshots, videos, scripts, and diagnostic files on disk, then reference paths in Markdown records.
- Generate Playwright Test regression script drafts only when the final execution plan requests script persistence or when a P0/P1 failure needs future regression.
Failure diagnostics:
- Use Chrome DevTools CLI when
agent-browser evidence is insufficient.
- Use Chrome DevTools MCP only when CLI diagnostics are unavailable, insufficient, or require interactive DevTools analysis.
- Child agents must not start MCP by default.
- If a dependency is unavailable, record the downgrade strategy and continue only when the remaining evidence is sufficient.
- Read the dependency check result before page execution.
- The main agent owns dependency installation prompts and install execution after explicit user confirmation.
- Child agents must not install dependencies. They may only record blockers or request main-agent intervention.
- If a diagnostic backend is unavailable, record the downgrade reason and evidence gap in the priority execution record.
- Do not claim Console, Network, HAR, trace, or MCP evidence unless the related tool actually produced it.
Progress Output
Report progress at priority start, meaningful checkpoints, failures, blockers, and priority completion. Keep updates concise and include evidence paths.
1---2name: test-execution3description: Use when confirmed planning artifacts and final execution plan are available and page verification, field comparison, evidence capture, or priority execution is requested.4---56# Test Execution78## Goal910Execute confirmed test cases and record evidence by priority.1112## Required Inputs1314- Confirmed module artifact directory.15- Readable `01-04` planning artifacts.16- Final execution plan from `execution-gate`.17- Confirmed risk boundary.18- Runtime dependency check result from `execution-gate`, including downgrade strategy for unavailable optional dependencies.1920## Execution Modes2122Single-agent mode:2324- Execute `P0 -> P1 -> P2 -> P3`.25- Write each priority result to its own `执行结果/Px/` directory.26- Each priority directory must contain priority-owned `05-执行记录.md` and `06-缺陷记录.md`, plus `screenshots/`, `videos/`, and `scripts/`.2728Multi-agent mode:2930- Dispatch by priority only.31- A child agent writes only its assigned `执行结果/Px/` directory.32- Each assigned priority directory must contain priority-owned `05-执行记录.md` and `06-缺陷记录.md`, plus `screenshots/`, `videos/`, and `scripts/`.33- Child agents do not modify `01-04`.34- Child agents do not write root `05-执行记录.md` or `06-缺陷记录.md`.3536## Priority Directory Contract3738For every executed priority, use this structure:3940```text41执行结果/Px/42执行结果/Px/05-执行记录.md43执行结果/Px/06-缺陷记录.md44执行结果/Px/screenshots/45执行结果/Px/videos/46执行结果/Px/scripts/47```4849Root `05-执行记录.md` and `06-缺陷记录.md` are generated by `result-aggregation` from these priority-owned files.5051## First-Run Browser Protocol5253Before the first browser navigation for each page or key flow, read and apply [browser-execution-protocol.md](references/browser-execution-protocol.md). Use it again when a browser recheck enters an unknown page state.5455- Match reconnaissance to static HTML or a dynamic application.56- Complete the enter, readiness, reconnaissance, locator, action, assertion, classification, evidence, and cleanup loop.57- Keep observable readiness conditions, runtime observation, locator risk, and resource ownership explicit in the priority execution record.58- Preserve the backend and diagnostic escalation rules below; the protocol standardizes execution behavior and does not replace the confirmed backend.5960## Evidence Rules6162- Passing cases need a result summary and do not require screenshots.63- Field differences require screenshots.64- Operation failures require an actual-result summary and a screenshot when feasible. Record Console, Network, Playwright video, Trace, or HAR evidence only when the selected backend actually produced it; otherwise record `未产生(原因)` and the resulting evidence gap.65- Missing account, permission, data, environment, or dependency is recorded as `阻塞`.66- Blockers are not defects unless the user confirms they are product or implementation issues.6768## Diagnostic Escalation6970Escalate from `agent-browser` to Chrome DevTools CLI only when one of these conditions occurs:7172- Console runtime error or white screen.73- Key request returns 4xx, 5xx, timeout, CORS, blocked, or redirect loop.74- Page load or key interaction exceeds the confirmed threshold.75- UI, API, local storage, or session state appears inconsistent.76- Upload, drag-and-drop, iframe, shadow DOM, canvas, map, chart, or rich text editor interaction fails.77- Current evidence is insufficient to write a reproducible defect.7879Escalate from Chrome DevTools CLI to Chrome DevTools MCP only when CLI output cannot complete the diagnosis.8081## Execution Backend Rules8283Default backend:8485- Use `agent-browser` for first-run browser execution.86- Use priority-isolated browser sessions in multi-agent mode, such as `AGENT_BROWSER_SESSION=P0`, `AGENT_BROWSER_SESSION=P1`, `AGENT_BROWSER_SESSION=P2`, and `AGENT_BROWSER_SESSION=P3`.87- Prefer batch execution and concise command output.88- Store screenshots, videos, scripts, and diagnostic files on disk, then reference paths in Markdown records.89- Generate Playwright Test regression script drafts only when the final execution plan requests script persistence or when a P0/P1 failure needs future regression.9091Failure diagnostics:9293- Use Chrome DevTools CLI when `agent-browser` evidence is insufficient.94- Use Chrome DevTools MCP only when CLI diagnostics are unavailable, insufficient, or require interactive DevTools analysis.95- Child agents must not start MCP by default.96- If a dependency is unavailable, record the downgrade strategy and continue only when the remaining evidence is sufficient.97- Read the dependency check result before page execution.98- The main agent owns dependency installation prompts and install execution after explicit user confirmation.99- Child agents must not install dependencies. They may only record blockers or request main-agent intervention.100- If a diagnostic backend is unavailable, record the downgrade reason and evidence gap in the priority execution record.101- Do not claim Console, Network, HAR, trace, or MCP evidence unless the related tool actually produced it.102103## Progress Output104105Report progress at priority start, meaningful checkpoints, failures, blockers, and priority completion. Keep updates concise and include evidence paths.