
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.
概覽
讓助理為網頁應用程式撰寫、執行並偵錯以 JSON 為基礎的端對端瀏覽器測試,並回傳截圖與網路日誌。
- 可以做什麼
- E2E Runner 提供 MCP 工具,用來執行測試套件、列出套件、建立測試與模組 JSON 檔案、擷取任意 URL 的截圖、分析頁面結構,以及查詢執行歷史、網路日誌與穩定性洞察。測試是純 JSON 動作清單,在真實瀏覽器池中執行,並回報通過/失敗、耗時、截圖與網路錯誤。它也能抓取 GitHub 或 GitLab issue 並據此產生測試,並提供用於即時執行與歷史紀錄的網頁儀表板。
- 適用情境
- 當你希望助理在不撰寫測試程式碼的情況下,為網頁應用程式建立並執行瀏覽器端對端測試、驗證某個缺陷是否可重現,或在開發過程中擷取與檢視頁面時,適合使用。它適合已經執行本機應用程式,並希望在同一段對話中完成測試建立、執行與報告的團隊。
- 執行需求
- 透過 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 分