Next generation e2e testing framework for web and mobile apps.
e2e is an end-to-end testing framework for web and mobile apps. Describe a goal in natural language and an agent drives the app to reach it. Check the result with locators and assertions in the same test.
// tests/checkout.e2e.ts
import { test, expect } from 'e2e';
test('a member upgrades to Pro', async ({ app, agent, screen }) => {
await app.open('/settings/billing');
await agent.act('upgrade the workspace to the Pro plan');
await agent.assert('the invoice preview shows a prorated amount');
await expect(screen.getByRole('status')).toContainText('Pro');
});
Bring your own subscription, API key, or local model.
A suite that gates a release must give the same result every time it runs on a commit. e2e can run that suite with no model call:
agent.act step that a later assertion verifies records its actions.
Commit the recordings in .e2e/cache/ and CI replays them with no model
call. With npx e2e run --strict-cache, agent.act never calls a model:
a step with no recording, an incomplete one, or one that no longer matches
the app fails.expect(locator) calls no model. With the built-in agent, agent.assert,
agent.waitFor, and agent.extract call the model on every run.See Caching for what replays and when.
npx e2e init
init asks for an engine, web or mobile, and a model provider, then writes a
config and an example test. The
quickstart covers the rest.
To see a finished setup in your stack, open
examples/:
Vite, Next.js, Astro, Angular, Expo, SwiftUI, Jetpack Compose, Kotlin Multiplatform,
Flutter, and .NET MAUI, each a standalone project with a passing suite.
npx e2e mcp is a Model Context Protocol
server over stdio. It gives a coding agent such as Claude Code, Codex, or
Cursor a live session on your app, on web, iOS, or Android: the agent sees
the screen, acts on it, gets back the test line that repeats each action, and
runs your suite. The server needs no model.
{
"mcpServers": {
"e2e": { "command": "npx", "args": ["e2e", "mcp"] }
}
}
See the MCP server docs for setup and every tool.
| Package | What it does |
|---|---|
e2e | The SDK, runner, and CLI. |
@e2e-dev/core | Drives a browser, a device, or a Mac app from your own program, with an optional agent and no test runner. e2e is built on it. |
@e2e-dev/web | Browser engine: Chromium, Firefox, and WebKit through Playwright. |
@e2e-dev/mobile | iOS and Android engine: simulators and emulators through agent-device. |
@e2e-dev/desktop | Desktop engine, experimental: native apps on macOS through its own Rust accessibility driver. |
@e2e-dev/electron | Electron engine, experimental: an Electron app's windows through Chromium's accessibility tree. |
@e2e-dev/decision | Decision-model executors for bounded semantic actions and assertions, and decisionFilter(), which leaves out the tests a pull request is unlikely to affect. |
@e2e-dev/acp | Runs agent steps on your own coding agent (Claude Code or Codex) over the Agent Client Protocol. |
| Package | What it does |
|---|---|
@e2e-dev/browser-run | Cloudflare Browser Run hosted Chromium for the web engine. |
@e2e-dev/kernel | Kernel hosted browsers for the web engine. |
@e2e-dev/notte | Notte cloud browsers for the web engine, one session per test attempt. |
@e2e-dev/lightpanda | Lightpanda, the open-source headless browser, started per run for the web engine. |
@e2e-dev/moli | Local Moli browsers wi |
Anthropic "input length and max_tokens exceed context limit" fails an act step as MODEL_PROVIDER_FAILED, not CONTEXT_OVERFLOW
https://github.com/e2e-inc/e2e/issues/2674
Labels: 없음
Run @e2e-dev/mobile iOS tests on Argent Cloud simulators
https://github.com/e2e-inc/e2e/issues/2671
Labels: 없음
browser.webmcp fails with ENGINE_FAILURE after a tool reloads the page
https://github.com/e2e-inc/e2e/issues/2668
Labels: 없음
Contributions are welcome, no matter how large or small. Bug reports and docs fixes count as much as features.
The code is Apache-2.0 (see LICENSE). There is no CLA and
no DCO bot. Section 5 of the license covers contributions: by opening a pull
request you agree that your contribution is licensed under the same
Apache-2.0 terms as the project (inbound = outbound). Only submit work you
have the right to license that way.
Please read the code of conduct before you post.
Security issues go through SECURITY.md, not the issue
tracker.
The changes most likely to be accepted:
examples/examples.json as
examples/CONTRIBUTING.md describesNew features, and changes to the public contract below, need agreement before any code. Open a feature request with the problem and the API you have in mind, and wait for a maintainer to agree before opening a PR. A feature PR nobody agreed to will likely be closed.
If you want to work on an existing issue, comment on it first so nobody else picks it up.
A bot checks every community PR:
fix, chore, test, perf, ci, build, and revert PRs link an
existing issue: Fixes #123 under ## Issue. feat, docs, and
refactor PRs are exempt.## Verified from the
PR template says how you checked it.A PR that fails the check gets the needs:compliance label and a comment
listing what to fix. If it is still failing 72 hours later, it is closed.
Once a day, community PRs open for more than a month with fewer than 2
positive reactions (👍 ❤️ 🎉 🚀) and no maintainer approval are closed too.
If one was closed by mistake, say so on the PR.
A maintainer adds the needs:maintainer-decision label when a PR waits on
them to accept its issue or set its direction, and comments on the PR with
what is undecided. While the label is on, the month-old close skips the PR
and it cannot get Ready for Human Review. The 72-hour close still applies:
fix anything the check flagged. Then wait until a maintainer decides and
removes the label.
A maintainer may finish a community PR themselves, for example when it is
close to done and landing it is faster than another review round. They add the
maintainer takeover label, and a comment on the PR names who took it over.
From then on:
If you would rather finish it yourself, say so on the PR and the maintainer removes the label.
The PR description is the source of truth for the change. Reviewers read it before the diff, so it follows the template:
## Why: the problem that led to it, in plain words, for someone who
has not seen this code.## What: new or changed API as a code sample, then what behaves
differently for existing users, one line each.## How it works: one sentence with a file:line for a small fix, a
<details> fold for more.## Verified: what you saw when you ran it, in up to three bullets, with
the commands and output in a fold; main beside your branch for a fix;
the pnpm bench:ab output for a speedup or a runner, agent, or engine
change; a pnpm record:terminal
recording when the terminal output or UI changes.Keep it to at most 180 words outside code and folds, and do not list what the diff touches.
Keep it true to the latest commit: when a push changes the behavior, the scope, or a number, edit the description too.
Keep PRs small, and write the description yourself, briefly. Long AI-generated descriptions may be ignored. If you can't explain the change in a few lines per section, the PR is probably too big.
Maintainers review PRs that carry the Ready for Human Review label. It says
that everything a machine can check is done, so a person only spends time on
judgment. Whether you or a coding agent drives the PR, the steps are the same.
Contributors cannot add labels. When the PR is ready, its author comments
exactly /ready, alone in the comment. A workflow adds the label, or replies
with what is missing, when all of these hold:
needs:compliance or
needs:maintainer-decision label.The label vouches for one commit. A push, a merge conflict, a maintainer's
review that requests changes, a move back to draft, or the
needs:maintainer-decision label removes it; comment /ready again
once the PR is back in shape.