e2e
An open framework for agentic end-to-end testing.
Write tests in ordinary TypeScript. Describe what a user does in natural language, and pin exact values and outcomes with regular assertions.
e2e tests applications through their user interface: web, mobile, desktop, and anything else with a UI. It is not an agent-eval harness and not an API-only tool.
import { test } from 'e2e';
test('user can sign up', async ({ app, agent }) => {
await app.open();
await agent.act('tap the sign up button');
await agent.assert('the dashboard is visible');
});
pnpm add -D e2e @e2edev/playwright playwright
AI_GATEWAY_API_KEY=... npx e2e run
Tests without agent steps, using screen, app, web, and expect, need no model.
The runner knows no platform: @e2edev/playwright is the browser engine a
web target names in its config, and a device or desktop engine plugs into the
same contract.
Why
Agentic testing should not require surrendering test control, portability, or diagnostics. Every agent call is a bounded operation you can interleave with deterministic steps:
await agent.act('choose the Pro plan');
await screen.getByRole('button', { name: 'Confirm' }).tap();
- Your code owns order and values; agent steps stay bounded.
- Waiting, retries, and reports are handled for you.
- Each passing
agent.act()records its action trace and the next run replays it zero-turn — no model calls — diverging to the live agent whenever the app no longer matches. On by default; opt out withcache: 'off'or--no-cache. Judgments are never cached. - Credentials never reach the model or the report.
--ai-tracerecords every model call to.e2e/ai-trace.json; open it with unbox-ai to see where the tokens went.--videorecords every attempt, a WebM in the browser or an MP4 on a device, so a failure can be watched instead of reconstructed. Off by default.- Runs locally. No account, no hosted runner. The CLI sends anonymous usage
counts to improve the framework, never your tests or your app's data;
e2e telemetry disableturns that off (what is sent).
Documentation
Coding agents
e2e init installs an agent skill into .agents/skills/ and
.claude/skills/, and npx skills add tester-army/e2e installs it
anywhere else. Without it, npx e2e guide prints the same text.
See Coding agents.
e2e mcp opens a live session on the app for a coding agent over MCP, with
the same tools the testing agent has behind four fixed MCP tools, so the
agent can look at the real screen and check a locator before writing the
test. e2e init registers it for Claude Code and Cursor.
Packages
e2e— the SDK, runner, and CLI.@e2edev/playwright— the browser engine, passed to a target asengine: playwright().@e2edev/agent-device— the mobile engine for iOS simulators and Android emulators; see the device reference.
Contributing
See CONTRIBUTING.md.
by TesterArmy