Skip to content
yisusvii
Go back

e2e: An Open-Source, Agent-Driven End-to-End Testing Framework for Web and Mobile

Suggest Changes

By

Table of Contents

Open Table of Contents

Why This Repo, Why Now

Checking github.com/trending today, the top repository is tester-army/e2e, described by its maintainers as “an end-to-end testing framework for web and mobile apps.” Instead of writing a script of selectors and waits, a test describes a goal in natural language — agent.act('upgrade the workspace to the Pro plan') — and an agent drives the running app to reach it, while the same test still checks the outcome with ordinary locators and assertions.

The pitch behind the trending spike is straightforward: UI changes break selector-based E2E suites constantly, and maintaining them eats time engineers would rather spend shipping. e2e lets an agent adapt to UI changes while a verified act step gets recorded into a replay cache, so the next run replays the recorded actions with no further model calls — tests with no agent steps need no model at all. The project also ships engines for both Playwright-driven web testing and iOS/Android testing through agent-device, plus a documented MCP-adjacent coding-agent workflow that lets tools like Claude Code or Cursor set up, run, and debug its tests. As always, a trending position reflects visibility and momentum, not a verdict on quality, security, or production-readiness — those are reviewed independently below.


What the Technology Actually Is

Per the repository’s README and documentation, e2e is a TypeScript monorepo built around a pluggable “engine” architecture, managed with pnpm workspaces and released with Changesets.

Documented architectural pieces:

At a high level, a test runs once per configured target (for example Chromium, or an iPhone simulator). Deterministic steps (locator, expect) never touch a model. Agent steps (agent.act, agent.assert, agent.waitFor, agent.extract) send the current screen — quoted to the model as untrusted evidence, never as instructions — through the AI SDK to whichever model you’ve configured (a subscription, an API key, or a local/self-hosted endpoint), per docs/models.mdx. A verified act step is cached and replayed on later runs without a model call, per docs/cache.mdx, which is the project’s documented answer to the token cost and flakiness of agent-only E2E suites.


Purpose and Use Cases

Per the README and linked docs, e2e’s primary purpose is covering real user flows on web and mobile without hand-maintaining brittle selector scripts for every UI change, while keeping an explicit “code-trust” vs. “untrusted model input” boundary so agent steps don’t gain more authority than a human reviewer would grant a test.

Documented use cases and target users:


Installation

Per the project’s Quickstart. The project documents one primary path — the init wizard — run through npm, pnpm, or bun.

Prerequisites

# npm
npx e2e init

# pnpm
pnpm dlx e2e init

# bun
bunx e2e init

The wizard asks for Web (Playwright) or Mobile (iOS/Android), then a subscription or model provider (or None for tests without AI), and writes a config, an example test, and adds dependencies — existing files are left intact.

Example web config written by the wizard (Vercel AI Gateway):

import type { E2EConfig } from "e2e";
import { web } from "@e2e-dev/web";
import { gateway } from "ai";

export default {
  agents: { default: { model: gateway("openai/gpt-6-luna-fast") } },
  targets: [{ engine: web(), app: { url: "http://localhost:3000" } }],
} satisfies E2EConfig;

Run the example test

# npm
npx e2e run

# pnpm
pnpm exec e2e run

# bun
bunx e2e run

This downloads a browser (or boots the simulator/emulator), checks that the app opens, and writes .e2e/report.json — no model calls, so no sign-in or API key is needed for this step.

Minimal getting-started example: an agent step

import { test } from "@e2e-dev/web";
import { expect } from "e2e";

test("a visitor signs up for a trial", async ({ app, agent, screen }) => {
  await app.open("/");

  await agent.act("sign up for a free trial as {name} with email {email}", {
    params: { name: "Ada Lovelace", email: "ada@example.test" },
  });

  await agent.assert("the welcome screen greets Ada by name");
  await expect(screen.getByRole("status")).toContainText("trial");
});
npx e2e run tests/agent.e2e.ts

To use a subscription instead of an API key, sign in once, e.g. npx e2e login github-copilot, per docs/subscriptions.mdx.


Quick Verification

Based on the documented commands:

  1. Example test passes with no model — npx e2e run after init should complete, open the app, and write .e2e/report.json, with no sign-in required.
  2. Agent step runs — after configuring a model or running npx e2e login, npx e2e run tests/agent.e2e.ts (or your own agent test) should pass; add --headed to watch a web run visually.
  3. Mobile environment check — npx agent-device doctor reports whether Xcode/Android SDK and a simulator/emulator are correctly set up before running mobile tests.
  4. CI reproduction locally — CI=1 npx e2e run reproduces CI defaults (serial workers, one retry, read-only cache) for debugging CI-only failures.
  5. Telemetry opt-out check — npx e2e telemetry disable or setting E2E_TELEMETRY_DISABLED=1/DO_NOT_TRACK=1 should stop the documented eu.i.posthog.com telemetry requests, per docs/telemetry.mdx.

Security Review

Verified from the repository itself (SECURITY.md and docs/security.mdx):

Security considerations to weigh yourself (documented factors, not verified vulnerabilities):

Practical recommendations:


Should You Use It?

Strengths: a clearly documented, itemized trust and secrets-handling model (code-trust vs. untrusted model input, pixel-tainting, trace redaction) that is unusually explicit for a project of this age; a replay-cache design that directly targets the real cost problem of agent-driven testing (token spend and model latency on every run); first-class web and mobile engines in one framework; a documented GitHub Actions CI workflow with sharding, failure-only reruns, and PR-comment reporting; and a very active commit/release cadence.

Limitations: the project is explicitly pre-1.0 (“APIs and config can still change between minor releases”), so upgrades may require config changes; agent steps still depend on an external model provider’s availability, cost, and non-determinism for anything not yet cached; there is no sandboxing of test code or dependencies, so the security of a suite still depends heavily on how carefully you vet what you run; and as a fast-moving framework spanning web, mobile, CI, and MCP-adjacent agent tooling, the configuration surface is large enough that getting model, secret, and CI settings right takes some upfront reading.

Good fit for: teams maintaining web or mobile E2E suites that break often on UI changes and want agent-driven goals instead of brittle selector scripts; teams that already use Playwright or mobile simulators/emulators and want to add agent steps incrementally, mixed with deterministic assertions; and teams building coding-agent-assisted development workflows that want tests an agent can read, run, and debug on its own.

Evaluate alternatives if: you need a stable, versioned-1.0 API for a large existing test suite; your organization cannot send any screen content to an external model provider, even redacted; or you need strong sandboxing guarantees around third-party or fork-contributed test code out of the box.

Primary sources used: GitHub repository · README · SECURITY.md · Documentation home · Quickstart · Models · Continuous integration · Cache · Telemetry · Coding agents · LICENSE


Suggest Changes
Share this post on:


Previous Post
Cloudflare’s September–October 2026 Updates: Quick Tunnels, Basin, and AI Tools
Next Post
Security Checklist for Your Home Linux Workstation Exposed to the Internet