E2E Testing

opus new

Quick reference

FieldValue
Command/brewcode:e2e
Argumentssetup, create [prompt], update [prompt], review [prompt], rules [prompt], status
Modelopus
ToolsRead, Write, Edit, Glob, Grep, Bash, Task, AskUserQuestion, Skill, WebSearch, WebFetch

Quick Start

    1. /brewcode:e2e setup — analyze project, create 5 E2E agents, generate rules
    2. /brewcode:e2e create "checkout flow" — BDD scenarios + autotests
    3. /brewcode:e2e review — quorum review (3 reviewers, 2/3 consensus)

Modes

Analyze project and create E2E infrastructure.

StepAction
S0Check prerequisites (framework, dirs, deps)
S1Check existing setup, ask if reconfigure
S23-5 Explore agents analyze project
S3User confirms agent roster
S4Create 5 agents in 2 batches via agent-creator
S5Generate rules (architect + WebSearch + reviewer)
S6Save config to .claude/e2e/config.json
S7Final summary

Create BDD scenarios and E2E autotests.

StepAction
C0Prerequisite check (agents exist?)
C1Define scope (from prompt or ask user)
C23-5 Explore agents analyze target area
C3scenario-analyst creates BDD scenarios
C4Review cycle: reviewer + cross-check (max 3)
C5User approves scenarios
C6automation-tester writes tests
C7Review cycle for tests (max 3)
C8Smoke validation (compile check)
C9Final summary with traceability

Update existing scenarios and tests.

StepAction
U0Prerequisite check
U1Define what to update
U2Find existing artifacts
U3Apply updates via appropriate agent
U4Review cycle (max 3)
U5Summary with diff

Multi-agent quorum review.

StepAction
R0Prerequisite check
R1Define review scope
R2Scan artifacts
R3Split scope into parts
R43x reviewer per part (quorum 2/3)
R5Cross-agent re-check of confirmed findings
R6Results report with fix proposals

Create or update E2E testing rules.

StepAction
L0Prerequisite check
L1Load current rules, check freshness
L2WebSearch + architect analysis
L3Update rules, reviewer validates
L4User approves diff
L5Optional export to .claude/rules/

Read-only infrastructure status.

CheckDetails
AgentsCount and list of e2e-* agents
RulesBase + project rule counts
ConfigStack, framework, paths
ArtifactsScenario and test counts by status
FreshnessLast update dates

Agents

🔧

e2e-architect

opus Analyzes project, defines E2E patterns, creates rules and conventions

📄

e2e-scenario-analyst

opus Creates detailed BDD scenarios from system analysis

📝

e2e-automation-tester

opus Writes E2E autotests from approved scenarios

▶️

e2e-manual-tester

sonnet Verifies system via UI/API, finds bugs

e2e-reviewer

opus READ-ONLY Reviews quality, rule compliance, coverage

Architecture

Layered E2E test architecture (all layers are stack-agnostic):

LayerPurposeExample
Test ClassesDomain-specific tests, parameterizedCheckoutE2ETest extends BasePaymentE2E
StepsBusiness-language reusable stepsgivenUserIsAuthorized("admin")
VerificationStrict assertion stepsthenOrderStatusIs(COMPLETED)
DataTest data generation via APIcreateTestUser(role: "buyer")
SupportTechnical integration utilitiesKafkaSupport, DatabaseSupport
ConfigEnvironment settingsCredentials, endpoints, timeouts

Three-Step Review Cycle

    1. Execute — agent performs work (scenario or test creation)
    2. Validate — different agent reviews against rules (MAX_CYCLES=3)
    3. Re-check — cross-domain verification of findings before fixing

Tip

Review cycles are capped at 3 iterations. If issues remain, the user decides whether to continue or accept.

Quorum Review

The review mode uses 3 parallel reviewers per scope part:

AgreementClassification
2-3 reviewers flag same issueConfirmed finding
Only 1 reviewer flagsUnconfirmed (noted, not auto-fixed)
All 3 agree cleanClean

Examples

/brewcode:e2e setup
/brewcode:e2e create "user registration with email verification"
/brewcode:e2e review "focus on assertion quality"
/brewcode:e2e setup
/brewcode:e2e create "checkout flow with Stripe payments"
/brewcode:e2e rules "add async messaging patterns"
/brewcode:e2e setup
/brewcode:e2e create "login and dashboard navigation"
/brewcode:e2e update "add negative scenarios to auth"