
E2e Runner
io.github.fastslack由 GitHub 账号 fastslack 发布v1.3.0更新于 Oct 24, 2026
JSON-driven E2E test runner with parallel Chrome pool execution and 16 MCP tools.
概览
让助手为 Web 应用编写、运行并调试基于 JSON 的端到端浏览器测试,并返回截图与网络日志。
- 可以做什么
- E2E Runner 提供 MCP 工具,用于运行测试套件、列出套件、创建测试与模块 JSON 文件、截取任意 URL 的截图、分析页面结构,以及查询运行历史、网络日志和稳定性洞察。测试是纯 JSON 动作列表,在真实浏览器池中执行,并回报通过/失败、耗时、截图和网络错误。它还能抓取 GitHub 或 GitLab issue 并据此生成测试,并提供用于实时运行与历史的 Web 仪表盘。
- 适用场景
- 当你希望助手在不编写测试代码的情况下为 Web 应用创建并执行浏览器端到端测试、验证某个缺陷是否可复现,或在开发过程中截取和检查页面时,适合使用。它适合已经运行本地应用、并希望在同一对话中完成测试创建、执行与报告的团队。
- 运行要求
- 通过 npx 或 Docker 作为本地进程运行;需要 Node.js 20 或更高版本。需要可访问的浏览器端点:已用远程调试端口启动的 Chromium、Obscura 二进制文件,或用于并行 Chrome 池的 Docker。GitHub issue 功能需要 gh CLI,GitLab 功能需要 glab CLI。视觉验证不需要 API 密钥。
安装
在 SourceWeft 中
- 打开 控制台中的 E2e Runner,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
English · Español
@matware/e2e-runner
The AI-native E2E test runner that writes, runs, and debugs tests for you.
[npm version] [node version] [npm downloads] [Docker pulls] [GitHub stars] [license] [MCP compatible] [AI native] [OpenCode compatible] [Agent Skills]
E2E Runner lets you test your web app without writing test code. Tests are plain JSON — and you don't even have to write that yourself: just ask Claude Code.
🎬 Write a test by asking — then watch it run
[Live dashboard streaming screenshots as a test suite runs]
The live dashboard while a suite runs — every step streams a screenshot into the feed, in real time.
With the built-in MCP server, creating a test is a conversation — no docs, no syntax to memorize:
You: Create an E2E test for the login flow and run it.
Claude Code: writes the test, runs it in a real browser, and reports back — ✅
login-flowpassed in 2.3s · screenshot saved · no network errors.
Behind the scenes Claude just wrote and ran this. A test is just JSON — an ordered list of what a user does:
No imports, no describe/it, no build step. If you can read it you can write it — or just ask.
Connect it to Claude Code (2 commands):
Now say "create a test for X and run it" — Claude gets 17 MCP tools, slash commands, and specialized agents.
Using a different agent (Cursor, Codex, Copilot, 40+ more)? Install the skill:
npx skills add fastslack/mtw-e2e-runner
📖 Contents
🚀 Install — it's tiny
Then pick how to run the browser. You don't need Docker unless you want the parallel pool:
Option 1 · Use the Chrome you already have — no Docker ⭐
Launch any Chromium browser with a debugging port, then point the runner at it:
Or bake it into e2e.config.js so you never repeat it:
Nothing to install beyond npm, and baseUrl is just localhost (the browser is on your machine).
Option 2 · Obscura — one tiny binary, no Docker
A single ~30 MB binary with built-in anti-detection. Install once, run it, point the runner at it:
npx e2e-runner pool start (with poolDriver: 'obscura' in your config) prints the exact install command for your OS.
Option 3 · Docker pool — parallel, for CI & big suites
A shared, queue-managed Chrome pool that runs many tests at once:
Requires Docker. Set baseUrl: 'http://host.docker.internal:3000' so the containerized Chrome can reach your app.
Why host.docker.internal (Docker option only)?
With the Docker pool, Chrome runs inside a container, so localhost there means the container — not your machine. host.docker.internal bridges to your host. On Linux (Docker Engine, not Docker Desktop) add --add-host=host.docker.internal:host-gateway, or use your LAN IP. Options 1 & 2 don't have this — the browser is local, so plain localhost just works.
Write your first test
Open e2e/tests/sample.json — a flow is an ordered list of actions:
Run it with npx e2e-runner run --all. Results — pass/fail, timing, screenshots, network errors — print to your terminal and to the web dashboard if it's open.
Updating
Each install method updates separately — bump the one(s) you use:
[!NOTE] Two gotchas: (1)
npxprefers a copy found in the project'snode_modulesover its own cache — if a project pins an old version, the MCP server and dashboard run that old version, so update the project dependency too. (2) Already-running processes keep the old code in memory: after updating, restart the dashboard and reconnect the MCP server (/mcp→e2e-runner→ Reconnect, or restart your session).
✨ What you get
🧪 Zero-code tests — JSON files that anyone on your team can read and write. No JavaScript, no compilation, no framework lock-in.
🤖 AI-powered testing — Claude Code creates, executes, and debugs tests natively through 17 MCP tools. Ask it to "test the checkout flow" and it builds the JSON, runs it, and reports back.
🐛 Issue-to-Test pipeline — Paste a GitHub or GitLab issue URL. The runner fetches it, generates E2E tests, runs them, and tells you: bug confirmed or not reproducible.
👁️ Visual verification — Describe what the page should look like in plain English. The AI captures a screenshot and judges pass/fail against your description. No pixel-diffing setup needed.
🧠 Learning system — Tracks test stability across runs. Detects flaky tests, unstable selectors, slow APIs, and error patterns — then surfaces actionable insights.
⚡ Parallel execution — Run N tests simultaneously against a shared browser pool (browserless, raw CDP, Lightpanda, Obscura, or Steel). Serial mode available for tests that share state.
🎯 Pluggable browser drivers — Pick the engine that fits each test: real Chrome via browserless, Lightpanda or Obscura for fast lightweight runs, Steel for managed sessions. Set driver per test or override the whole run with --driver.
📊 Real-time dashboard — Live execution view, run history with pass-rate charts, screenshot gallery with hash-based search, expandable network request logs.
🔁 Smart retries — Test-level and action-level retries with configurable delays. Flaky tests are detected and flagged automatically.
📦 Reusable modules — Extract common flows (login, navigation, setup) into parameterized modules and reference them with $use.
🏗️ CI-ready — JUnit XML output, exit code 1 on failure, auto-captured error screenshots. Drop-in GitHub Actions example included.
🌐 Multi-project — One dashboard aggregates test results from all your projects. One Chrome pool serves them all.
🐳 Portable — Chrome runs in Docker, tests are JSON files in your repo. Works on any machine with Node.js and Docker.
✍️ Writing tests
Everything about authoring tests — the file format, the full action vocabulary, retries, state isolation, and reuse. Expand what you need:
Test format & file layout
Each .json file in e2e/tests/ contains an array of tests. Each test has a name and sequential actions:
Suite files can have numeric prefixes for ordering (01-auth.json, 02-dashboard.json). The --suite flag matches with or without the prefix, so --suite auth finds 01-auth.json.
Action catalog — navigation, input & interaction
Click by text — when click uses text instead of selector, it searches across common interactive and content elements:
Assertions — verify text, elements, URLs, counts & network
Framework-aware actions — React/MUI without evaluate boilerplate
These actions handle common patterns in React/MUI apps that normally require verbose evaluate boilerplate:
Multi-tab actions — popups, OAuth windows & cross-tab flows
All subsequent actions run in the active tab:
Retries & flaky detection
Test-level retry — retry an entire test on failure. Set globally via config or per-test:
Tests that pass after retry are flagged as flaky in the report and learning system.
Action-level retry — retry a single action without rerunning the entire test. Useful for timing-sensitive clicks and waits:
Set globally: actionRetries in config, --action-retries <n> CLI, or ACTION_RETRIES env var. Delay between retries: actionRetryDelay (default 500ms).
Serial tests — for tests that share state
Tests that share state (e.g., two tests modifying the same record) can race when running in parallel. Mark them as serial:
Serial tests run one at a time after all parallel tests finish — preventing interference without slowing down independent tests.
Testing authenticated apps
The simplest approach — log in via the UI like a real user:
For SPAs with JWT, skip the login form by injecting the token directly:
Or set it globally in config:
Each test runs in a fresh browser context, so auth state is automatically clean between tests.
More strategies: Cookie-based auth, HTTP header injection, OAuth/SSO bypasses, reusable auth modules, and role-based testing — see docs/authentication.md
Reusable modules — extract common flows with $use
Extract common flows into parameterized modules:
Use in tests:
Modules support parameter validation (required params fail fast), conditional blocks ({{#param}}...{{/param}}), nested composition, and cycle detection.
Hooks — beforeAll / beforeEach / afterEach / afterAll
Run actions at lifecycle points. Define globally in config or per-suite:
Important:
beforeAllruns on a separate browser page that is closed before tests start. UsebeforeEachfor state that tests need (cookies, localStorage, auth tokens).
Exclude patterns — skip drafts from --all
Skip exploratory or draft tests from --all runs:
Individual suite runs (--suite) are not affected by exclude patterns.
🤖 AI integration
The whole point: your agent writes, runs, and verifies tests for you.
Claude Code — plugin install & MCP-only install
This gives Claude 17 MCP tools, a workflow skill, 4 slash commands (/e2e-runner:run, /e2e-runner:create-test, /e2e-runner:verify-issue, /e2e-runner:capture), and 3 specialized agents (test-analyzer, test-creator, test-improver).
MCP-only install (tools only, no skill/commands/agents):
The 17 MCP tools
Pool start/stop are CLI-only — not exposed via MCP.
Visual verification — describe the page, AI judges it
Describe what the page should look like — AI judges pass/fail from screenshots:
After test actions complete, the runner auto-captures a verification screenshot. The MCP response includes the screenshot hash — Claude Code retrieves it and visually verifies against your expect description. No API key required.
Issue-to-test — turn a bug report into a runnable test
Turn GitHub and GitLab issues into executable E2E tests. Paste an issue URL and get runnable tests — automatically.
How it works:
- Fetch — Pulls issue details (title, body, labels) via
ghorglabCLI - Generate — AI creates JSON test actions based on the issue description
- Run — Optionally executes the tests immediately to verify if a bug is reproducible
In Claude Code, just ask:
"Fetch issue #42 and create E2E tests for it"
Bug verification logic: Generated tests assert the correct behavior. Test failure = bug confirmed. All tests pass = not reproducible.
Auth: GitHub requires gh CLI, GitLab requires glab CLI. Self-hosted GitLab is supported.
📊 Dashboard & insights
Web dashboard tour — live view, history, gallery, pool status
Live execution — monitor tests in real-time with step-by-step progress, durations, and active worker count.
[Dashboard - Live test execution]
Test suites — browse all suites across projects. Run a single suite or all tests with one click.
[Dashboard - Test suites grid]
Run history — track pass-rate trends with the built-in chart. Click any row to expand full detail.
Run detail — PASS/FAIL badges, screenshot thumbnails with copyable hashes (ss:77c28b5a), formatted console errors, and network request logs.
Screenshot gallery — browse all captured screenshots with hash search (action, error, and verification captures).
[Dashboard - Screenshot gallery]
Pool status — Chrome pool health: available slots, running sessions, memory pressure.
Learning system — flaky tests, unstable selectors, slow APIs
The runner learns from every test run — building knowledge about your test suite over time. Query insights via the e2e_learnings MCP tool:
Storage & export:
- SQLite (
~/.e2e-runner/dashboard.db) — default, zero setup - Neo4j knowledge graph — optional, for relationship-based analysis. Manage via
e2e_neo4jMCP tool ordocker compose - Markdown report (
e2e/learnings.md) — auto-generated after each run
Test narration: Each test run generates a human-readable narrative of what happened step by step, visible in the CLI output and the dashboard.
Network error handling — assertions, global flag, full logging
Explicit assertion — place assert_no_network_errors after critical page loads:
Global flag — set failOnNetworkError: true to automatically fail any test with network errors:
When disabled (default), the runner still collects and reports network errors — the MCP response includes a warning when tests pass but have network errors.
Full network logging — all XHR/fetch requests are captured with URL, method, status, duration, request/response headers, and response body (truncated at 50KB). Viewable in the dashboard with expandable request detail rows.
MCP drill-down flow:
The e2e_run response stays compact (~5KB) regardless of how many requests were captured. Use e2e_network_logs with the returned runDbId to drill into details on demand.
Screenshot capture — snapshot any URL on demand
Capture screenshots of any URL on demand — no test suite required:
Via MCP, the e2e_capture tool supports authToken and authStorageKey for authenticated pages — it injects the token into localStorage before navigating.
Every screenshot gets a deterministic hash (ss:a3f2b1c9). Use e2e_screenshot to retrieve any screenshot by hash — it returns the image with metadata (test name, step, type).
🌐 Browser drivers
The runner can talk to multiple browser engines through different drivers. The default is auto — it probes each pool URL and picks the right driver per pool.
Pick a driver per test / force one per run
driver is optional. If set, only pools whose detected driver matches become candidates. fallbackDriver is explicit opt-in — without it, a missing target driver fails the test with a clear message. Pool busyness does not trigger fallback; the runner waits inside the filtered set.
Force a driver for a whole run (CLI overrides win over per-test fields — useful for A/B benchmarks):
Running each driver locally
⚙️ CLI, config & CI
CLI commands
CLI options
Configuration — e2e.config.js & priority
Create e2e.config.js in your project root:
Config priority (highest wins):
- CLI flags
- Environment variables
- Config file (
e2e.config.jsore2e.config.json) - Defaults
When --env <name> is set, the matching profile overrides everything.
CI/CD — JUnit XML & GitHub Actions
Programmatic API
Requirements
- Node.js >= 20
- Docker — only for Option 3 (the parallel Chrome pool). Options 1 & 2 don't need it.
License
Copyright 2026 Matias Aguirre (fastslack) — Matware
Licensed under the Apache License, Version 2.0. See LICENSE for details.
来源:README.md,提交 72b472f
工具
0版本历史
1- v1.3.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分