Runs E2E browser tests from natural language JSON files using agent-browser, with dev server support, screenshots, and visual regression. Use for UI, browser, or web app testing.
From e2e-test-runnernpx claudepluginhub leejuoh/claude-code-zero --plugin e2e-test-runnerThis skill is limited to using the following tools:
references/test-schema.mdDesigns and optimizes AI agent action spaces, tool definitions, observation formats, error recovery, and context for higher task completion rates.
Implements structured self-debugging workflow for AI agent failures: capture errors, diagnose patterns like loops or context overflow, apply contained recoveries, and generate introspection reports.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
Run browser E2E tests defined in natural language JSON files. Each test case gets its own Claude Code session and browser instance for full isolation. Uses agent-browser for token-efficient interaction with built-in video recording.
# Run tests (dev server already running)
/e2e-test tests/login.test.json
# Auto-start dev server, take screenshots
/e2e-test tests/login.test.json --run "npm run dev" --port 3000 --screenshots
# Visual regression against baseline
/e2e-test tests/login.test.json --baseline ./e2e-results/1234567890
$ARGUMENTS to extract the test file path and any flags${CLAUDE_PLUGIN_DATA}/node_modules. If not, run:
cd "${CLAUDE_PLUGIN_DATA}" && cp "${CLAUDE_PLUGIN_ROOT}/scripts/runner/package.json" . && npm install --production 2>&1
command -v agent-browser >/dev/null 2>&1 || { echo "agent-browser not found. Install: npm install -g agent-browser && agent-browser install"; exit 1; }
"${CLAUDE_PLUGIN_DATA}/node_modules/.bin/tsx" "${CLAUDE_PLUGIN_ROOT}/scripts/runner/src/index.ts" --testsPath <path> --resultsPath ./e2e-results [additional flags from $ARGUMENTS]
./e2e-results/test-summary.md and present the results to the user./e2e-results/report.html exists, mention it for detailed interactive viewingFor how to write test files, see references/test-schema.md.
| Flag | Description |
|---|---|
--testsPath, -t | Path to the JSON test file (required) |
--resultsPath, -o | Output directory for results (default: ./e2e-results/<timestamp>) |
--verbose, -v | Include all Claude Code messages in output |
--screenshots, -s | Take screenshots at every step (not just failures) |
--maxTurns | Max Claude Code interactions per test (default: 30) |
--model, -m | Override the Claude model |
--run <command> | Dev server start command (e.g. npm run dev) |
--port <port> | Dev server port (auto-detected from framework, fallback: 3000) |
--url <url> | Override the URL to open (instead of http://localhost:port) |
--headed | Show the browser window (default: headless) |
--baseline <path> | Baseline results directory for visual regression diff |
npm install -g agent-browser && agent-browser install. Without it, the runner exits immediately..webm files per test case. They play natively in browsers.--run is omitted and --url is not set, the runner auto-detects the framework from package.json and starts the appropriate dev server. Use --run to override../e2e-results/ by default. Each run creates a timestamped subdirectory.report.html) includes embedded video playback and expandable test details.--baseline), screenshots are compared pixel-by-pixel. Diff images are saved as diff-step-*.png.