Demo ·
How it works ·
Quick start ·
Features ·
Commands ·
Limitations ·
Links
e2e Test Runner for VS Code puts e2e tests into VS Code's native Testing view. You can discover tests, run, cancel and debug exactly the ones you pick, open traces, rerun failures and see model usage. It always uses the project's own e2e installation, so a run in the editor is the same command you would run in a terminal or in CI.
[!NOTE]
Independent project, not affiliated with e2e-inc. Working name; it can change.
Status: 0.5.1, on the Visual Studio Marketplace. Verified on Windows with VS Code 1.134; macOS untested. Details: compatibility.
◆ What is e2e?
e2e is an end-to-end testing framework (npm package e2e). Tests get fixtures such as app, browser and agent. They mix ordinary locator steps with agent steps (agent.act('…')) that a model carries out. A replay cache records agent steps so later runs can replay them instead of calling the model again. A project defines targets (for example chromium), setup tests and sessions in e2e.config.ts. e2e writes a structured JSON report, traces and screenshots for each run.
import { test } from "@e2e-dev/web";
import { expect } from "e2e";
test("guest can pay with card", async ({ app, agent, browser }) => {
await app.open("/checkout");
await agent.act("fill the card form with test data"); // agent step: replayed or live
await expect(browser.locator(".receipt")).toBeVisible();
});
[!TIP]
⭐ Enjoying e2e? Give it a star!
This extension exists because of e2e. A star costs you one click. It helps the framework get noticed, tells its maintainers the work matters and keeps agent-driven testing moving forward.
👉 Star e2e-inc/e2e on GitHub 👈

The extension reads all of this: targets, test–target–agent variants, setup dependencies, replayed vs. live agent steps and the report. You see it as tests, results and evidence in VS Code.
Check this extension in action
Run a test file. Start it from the Testing view, watch pass/fail and model usage come in, then open the failed test's trace.
Pick a run profile. Run, Headed, Strict Replay, Live (No Cache) and Debug, each adding its own e2e flag.
Run exactly what you selected. Selecting two tests builds one e2e command that runs only those two.
Rerun only the failures. Rerun Failed Tests picks up the three tests that failed and nothing else.
Configure it in one panel. Configs and targets, run options, setup, model usage, status and actions.
Keep a run history. Every finished run is recorded with its counts and duration; from there you open its report or compare it with the previous run.
Read the report and trace. Result counts, the failed test's message, and the trace view with its step timeline and screenshot.
Compare two runs. Each test is marked as a new failure, fixed, still failing, added, removed or slower.
Animations are illustrations of the real UI (VS Code's own Testing view plus the extension's commands); test names, timings and numbers are examples.
⚙ How it works
- Discover. The extension activates when the workspace has an
e2e.config.ts (or .mts, .js, .mjs). Once the folder is trusted, it runs e2e list --reporter json and builds the test tree, and it re-lists after relevant saves.
- Select. Your pick (a test, a file, a project or a mix) becomes one exact e2e command. When one command cannot express it, the extension runs separate batches or asks first. It never runs more than you chose without asking.
- Run. It spawns the project's
node_modules/e2e with a Node found via e2eRunner.nodePath, your login shell (nvm/fnm/volta) or PATH. Live progress shows each test as it starts.
- Map back. e2e writes its report, traces, screenshots and logs to
.e2e/vscode-runs/<runId>/. The extension turns them into pass/fail, inline failure messages, model usage and an Open Test Trace link.
⚡ Quick start
npm install
npm run package # builds e2e-test-runner.vsix
code --install-extension e2e-test-runner.vsix
Or in VS Code: Extensions → … → Install from VSIX…. Open a folder that contains an e2e.config.ts and trust it, and the tests appear in the Testing view (beaker icon). A normal npm or pnpm project needs no settings.
No e2e project yet? Run e2e: Initialize e2e Project (also in the Testing view's "…" menu).
Requirements
|
|
| VS Code |
1.134 or later (desktop) |
| Node.js |
22.22.3+ or 24.8+ (what e2e 0.26 requires) |
| e2e |
0.26.x installed locally in the project (npm or pnpm). Newer versions work with a warning; older ones are blocked and the supported version is shown |
✦ Features
|
Feature |
What you get |
| 🧪 |
Native Testing view |
Tests, files and projects in VS Code's tree, gutter icons, Test Results, cancel |
| 🎛 |
Five run profiles |
Run, Run Headed, Run Strict Replay, Run Live (No Cache), Debug, from the run button's dropdown or a test's right-click menu |
| 🎯 |
Exact selection |
Runs only what you picked; asks before running anything extra |
| 🔁 |
Rerun and continuous run |
Rerun Last Selection, Rerun Failed Tests, and Run Tests Continuously on the Run profile |
| 🔍 |
Traces and evidence |
Open a result's trace.md, screenshots and logs; optionally open the trace automatically when a single-test run fails |
| 💸 |
Model usage |
Model calls, tokens, cached tokens, estimated cost (or unknown) and replayed vs. live agent steps, per test and per run |
| 🎚 |
Settings panel |
An e2e view in the Testing sidebar for configs, targets, run options, setups and usage |
| 🗂 |
Run history and reports |
An e2e Run History view, a report per run, and a comparison of two runs (new failures, fixed, slower, cost) |
| 📈 |
Test insights |
Flaky tests (also tagged flaky in the Testing view), tests slower than usual, slowest tests, model cost per test over time |
| 🧭 |
Trace view |
A failed test's trace.md as a step timeline with its screenshot and source links |
| 🔎 |
CodeLens |
Run · Debug · last result above each test |
| 💰 |
Budget guard |
Optional per-run cost limit, estimated from earlier runs |
| 📋 |
CLI parity |
Copy Equivalent CLI Command gives the exact npx e2e run … for a test, file or project |
| 🩺 |
Environment checks |
Check Project Environment runs the extension's checks plus e2e doctor, with next steps |
| 🛡 |
Workspace Trust aware |
In Restricted Mode projects are listed with an explanation and nothing runs |
Run profiles
| Profile |
Use it for |
| Run |
Everyday runs; the only profile with continuous run |
| Run Headed |
Watch the browser |
| Run Strict Replay |
Replay recorded agent steps. Not a no-AI guarantee: agent.assert, waitFor, extract and unrecorded steps can still call a model |
| Run Live (No Cache) |
Ignore the replay cache; asks first above e2eRunner.liveConfirmThreshold tests, because agent steps may call a billed model |
| Debug |
Attach the VS Code debugger (one worker, --workers 1) |
Settings panel
The e2e view in the Testing sidebar (below Test Explorer) configures the extension without editing settings.json:
- Configs and targets: a checkbox per config (unchecked configs leave the tree and Run all) and per target (the same selection as e2e: Select Targets). Pin to settings writes the enabled configs to
e2eRunner.configPaths.
- Run options: Show browser — one worker (normal Run and Debug add
--headed --workers 1), Show trace on failure (single-test runs), Update snapshots on the next run only (--update-snapshots, switches itself off), reveal output, save before run, concurrency, live confirmation threshold.
- Setup: each setup test with its sessions and the tests that use it; Run tests that use it (e2e runs a setup only for tests that need it, so a setup cannot run alone).
- Model usage: the last run per project (calls, tokens, cached tokens, estimated cost or unknown, replayed vs. live agent steps, most expensive tests) and a total for this VS Code session.
- Status and actions: e2e version, Node and how it was found, trust; Refresh, Check Environment, Statistics, Clean Old Runs, Copy Diagnostics, Open Settings.
Every control is backed by a setting or a command, so nothing is panel-only. In Restricted Mode the panel is read-only. e2e 0.26 has no global-setup or cache-update flag, so those controls are not shown.
Model usage and cost
After each run, Test Results and the output channel show the model calls, tokens and e2e's estimated cost. Each agent-backed test shows its own usage and how many agent steps were replayed vs. live. Values come only from e2e's report; when e2e reports no cost, it shows as unknown, never 0. (Checked against e2e's report schema; not yet against a live model run.)
Run history, reports and comparison
Each run started from VS Code is recorded and can be opened again later. See Run history, insights and budget for what is stored and how flaky and slow tests are detected.
e2e Run History view (Testing sidebar, below the e2e panel)
- One row per run, newest first: project and profile, how long ago, the counts (
✓ passed, ✗ failed, ~ flaky, – skipped) and the total test time. Cancelled runs are kept and marked cancelled.
- The icon gives the outcome: passed, failed, flaky only, or cancelled.
- Expand a run to see its failed and flaky tests.
- Hover a run for Open Run Report and Compare with Previous Run. Both are also on its right-click menu.
- The view's title bar has Show Test Insights, Compare Runs and Refresh. Clear Run History is in its "…" menu.
Run report
- Tiles for tests, passed, failed, flaky, skipped, errored, test time and model cost.
- Links to compare with the previous run and to reveal each run folder.
- Failures and flaky tests: e2e's error message for each one, an expected/actual block for assertions, and the attempts of flaky tests (for example failed → passed). Each has Reveal in Test Explorer, Go to source and Open trace.
- All results: every test with its verdict, duration, attempts and cost.
- Open trace opens the trace view: a step timeline (replayed or live agent steps included), the failure screenshot and links to the source line. Open as Markdown shows the raw
trace.md.
Compare runs
- Pick two runs of the same project with Compare Runs, or use Compare with Previous Run on a run.
- Tiles count new failures, fixed, still failing, added, removed, slower and faster, plus model cost changes.
- Each group has a table with the verdict or duration before and after. A test name reveals that test in the Test Explorer.
- Added and removed mean the test was in only one of the two runs, for example after you change the selection or a filter.
Coding agents (MCP)
Coding agents can run tests and read their results through the extension's own MCP server, e2e-runner. It uses the same selection, cost rules and run history as the Test Explorer, so runs an agent makes show up in the e2e Run History view.
- Off by default. Turn it on with
e2eRunner.agentServer or the Coding agents section of the e2e panel, which also shows its status. Until then nothing is installed or offered to agents.
- Tools:
list_projects, list_tests, plan_run, run_tests, rerun_failed, cancel_run, get_run, list_runs, get_failure (error, the end of the trace, paths to screenshots and logs), get_trace (the trace's steps, paged), get_insights, get_regressions (tests that got slower), compare_runs, diagnose_project (why a project cannot run, with e2e doctor checks) and get_stats (test counts).
- VS Code agents (for example Copilot agent mode) find the server on their own in a trusted workspace.
- Claude Code and other clients: run e2e: Copy MCP Server Config for Coding Agents, then run the copied
claude mcp add --scope local … line in a terminal. The JSON form for other clients is in the e2e output.
- Confirmations: an agent can't click a dialog, so it has to say yes in the call. It must pass
allowExtra before a selection that runs extra tests, and confirmLive before a live run above e2eRunner.liveConfirmThreshold. e2eRunner.costBudgetPerRun is a hard limit for agents: they can lower it for one call but not raise it.
- One run at a time per project: if VS Code is running a project's tests, the agent is told to wait (
RUN_LOCKED). If an agent is running them, VS Code waits.
- Not covered: writing tests and driving a live app. e2e has its own
e2e mcp server and skill for that.
- An agent skill that describes the workflow ships in
docs/agents/e2e-runner/SKILL.md. Copy it into your agent's skills folder if your agent uses skills.
The server is a separate Node process (dist/mcp.mjs, about 130 KB, no dependencies). The extension never loads it. While the setting is on, the extension copies it to its global storage on startup, so the copied config keeps working after updates. Turning the setting off stops offering it to VS Code agents; a client you configured yourself keeps its config until you remove it (claude mcp remove e2e-runner).
⌘ Commands
All commands are in the Command Palette under e2e:.
| Command |
What it does |
| Select Targets |
Chooses which targets container runs use |
| Rerun Last Selection / Rerun Failed Tests |
Same profile as the last run; dependencies are added again; nothing failed → nothing runs |
| Open Test Trace |
Opens a result's trace.md in the trace view (step timeline, screenshot, source links; Open as Markdown inside), or its screenshots and logs (also on a test's right-click menu) |
| Open Run Report |
A report of a recorded run: counts, failures with messages and traces, all results with duration, attempts and cost. Also from the e2e Run History view and the CodeLens result |
| Compare Runs |
Two runs of a project side by side: new failures, fixed, still failing, added, removed, slower, faster, cost changes. Compare with Previous Run is on each run in the history view |
| Show Test Insights |
From recorded runs only: flaky tests, tests slower than usual, slowest tests, model cost per test over time |
| Clear Run History |
Forgets recorded runs (run folders on disk stay; use Clean Old Runs for those) |
| Copy Equivalent CLI Command |
Copies the exact npx e2e run … for a test, file or project (right-click menu) |
| Continuous run |
The Run profile supports VS Code's continuous run (the eye icon / Run Tests Continuously): the selected tests rerun after each relevant save, once the changed project has been re-listed |
| Check Project Environment |
Extension checks plus e2e doctor per project, with next steps |
| Show Test Statistics |
Dry-run listing per project (nothing executed): tests, variants, targets, skips, setups, and tests per tag, top-level describe, folder and file. Printed to the output and written to .e2e/stats/test-stats-<time>.json and .md |
| Copy Diagnostics |
Redacted environment report for bug reports; nothing is sent anywhere |
| Clean Old Runs |
Deletes old run folders created by this extension, after showing them; never automatic |
| Initialize e2e Project |
Runs e2e's setup wizard (e2e init, pinned to the supported e2e line) in a terminal in a folder you pick, with that folder's package manager |
| Initialize e2e Project (Quick, Default Answers) |
Shows what e2e init --yes will write, asks, runs it, then offers to install dependencies |
| Open e2e Repository / Open e2e Documentation |
Opens github.com/e2e-inc/e2e or e2e.com/docs in the browser |
| Refresh Tests / Show Runner Output |
Re-list tests / open the e2e output channel |
Settings
All settings use the e2eRunner. prefix: configPaths, nodePath, autoDiscover, discoveryDebounceMs, discoveryTimeoutMs, saveBeforeRun, concurrency, liveConfirmThreshold, costBudgetPerRun, showBrowser, showTraceOnFailure, revealOutput, codeLens, artifactRetentionRuns, logLevel. See Settings → Extensions → e2e Test Runner for VS Code.
Run history, insights and budget
Each run started from VS Code is recorded per project (the last 50, in VS Code's workspace storage, not in your project): verdicts as e2e reported them (flaky and timed-out included), attempts, durations and model usage. The e2e Run History view, run reports, comparisons, insights, the flaky test tag and CodeLens results all read from it; nothing extra runs. Runs from the terminal or CI are not recorded.
- Flaky: e2e reported the test flaky (passed on retry) at least once, or it switched between pass and fail at least twice, in its last 10 results.
- Slower than usual: the latest duration is at least 1.5× and 1 s above the median of at least 3 earlier results.
- Budget guard (
e2eRunner.costBudgetPerRun, USD, 0 = off): before a run, the highest cost each selected test had in earlier runs is added up; above the budget the extension asks first. Tests whose cost e2e did not report are named as unknown and not counted. This is an estimate, not a limit e2e enforces.
Run output
Runs write their output to .e2e/vscode-runs/<runId>/ inside the project (e2e requires the output to be inside the project). Add .e2e/ to your .gitignore; the extension offers to copy that line once. e2e keeps a trace for failed tests by default (trace: 'retain-on-failure' in the e2e config).
⚠ Known limitations
- e2e versions: only 0.26.x is supported; a new e2e minor needs an extension update.
- macOS is untested.
- Model usage and cost are read from e2e's report; checked against e2e's report schema, not yet against a live model run. Missing cost shows as unknown.
- Live progress shows when each test starts; pass/fail appears when the run's report is read at the end.
- Debugging runs one worker (
--workers 1).
- Continuous run is available on the Run profile only (not Headed, Strict, Live or Debug). Agent tests may call a model on every rerun when the replay cache misses.
- Exact selection: some selections cannot be expressed as one e2e command; the extension then runs separate batches or asks before running extra tests. It never runs more than you chose without asking.
- Run folders under
.e2e/vscode-runs/ are never deleted automatically; use e2e: Clean Old Runs.
- Strict Replay is not a no-AI guarantee:
agent.assert, waitFor, extract and unrecorded steps can still call a model.
🛡 Security and privacy
- Listing e2e tests imports the project's config and test files, which runs project code. In an untrusted workspace (Restricted Mode) the extension shows each project with an explanation and runs nothing.
- The extension sends nothing anywhere and has no telemetry. e2e itself has telemetry on by default; set
E2E_TELEMETRY_DISABLED=1 in your environment to turn it off.
- Traces, screenshots and logs may contain sensitive app data.
🛠 Develop
npm install # dev dependencies (TypeScript, esbuild, test tools)
npm run fixture # once: prepares a sample e2e project in fixture/.work/0.26.1
Open this folder in VS Code and press F5 (Run and Debug → Run Extension (fixture workspace)). A second window, the Extension Development Host, opens the sample project with the extension loaded. Open the Testing view to see the tests. To try your own project, open its folder in the Extension Development Host window.
npm scripts
| Script |
What it does |
npm run build |
Bundle the extension into dist/extension.cjs |
npm run typecheck |
Strict TypeScript check, no output files |
npm test |
Unit and contract tests (Node's built-in test runner, ~3 s) |
npm run check |
Typecheck + tests |
npm run test:host |
Extension-host tests in a real VS Code window (trusted, Restricted Mode, multi-root). VSCODE_VERSION=1.134.0 tests a specific VS Code |
npm run test:vsix |
Builds the VSIX, installs it into a throwaway VS Code and checks it works |
npm run test:integration |
Real e2e runs through the extension's adapter, for npm and pnpm (~30 s) |
npm run perf |
Measures the performance targets; writes docs/release/perf-<platform>.json |
npm run package |
Builds e2e-test-runner.vsix |
npm run fixture |
Prepare the sample e2e workspace |
npm run test:spikes |
Checks over the M0 spike evidence |
🔗 Links
e2e
Documentation ·
CLI reference ·
Configuration ·
Debugging a run ·
Repository ·
npm package
[!TIP]
⭐ Enjoying e2e? Give it a star!
This extension exists because of e2e. A star costs you one click. It helps the framework get noticed, tells its maintainers the work matters and keeps agent-driven testing moving forward.
👉 Star e2e-inc/e2e on GitHub 👈

VS Code
Testing API ·
Workspace Trust ·
Install from VSIX
Inspiration
Playwright Test for VS Code: interaction model only; not a dependency or parity commitment.
👤 Author
Main developer: Freudenberger
Source code and issues: github.com/jaktestowac/e2e-test-runner-vscode
Made with jaktestowac.pl and AI_Testers.
📄 License
Licensed under the Apache License, Version 2.0. Attribution notices are in NOTICE.
Created with ❤️💚 for the e2e and test automation community.
| |