e2e: The open source AI testing framework
Short summary
e2e is a TypeScript testing framework that uses AI agents to test web and mobile apps while caching and replaying actions to avoid redundant model calls. It combines deterministic code-based assertions with AI-driven testing goals, letting you pick your own model, gateway, and execution environment.
- Replays cached agent actions without re-running the model, cutting token usage and costs on repeated test runs
- Supports both web and mobile testing through a single API, with migration paths from Playwright, Cypress, Selenium, Detox, and Maestro
- Lets you bring your own AI model (ChatGPT, Copilot, local server, etc.) and customize how the agent approaches testing, rather than forcing a specific model or testing philosophy
Full summary
e2e is an open-source TypeScript testing framework that cuts down on AI token usage by caching and replaying agent actions instead of rerunning the same reasoning repeatedly. The core insight is simple: when you test the same flow twice, there's no reason to make the AI model think through identical steps again. It remembers what worked and skips the model call on subsequent runs. You configure it to work with whatever you're already using — ChatGPT, GitHub Copilot, SuperGrok, local servers, or OpenRouter. The framework lets you write tests in plain language describing goals rather than brittle step-by-step scripts, then mixes in deterministic assertions and precise locators where they actually matter. It handles web, iOS simulators, and Android emulators through the same API.
The testing approach splits the difference between pure AI agents and traditional deterministic testing. You describe what your app should do in natural language, the agent figures out the actions, and the framework combines that with exact locators and assertions where precision counts. Secrets live only in environment variables, never in test code. CI mode kicks in automatically with one retry and a read-only trace cache that replays verified steps without calling the model. If something breaks, you get a screenshot, trace, logs, and the exact failing step — then you can rerun with `--headed` or `--debug` to watch it live.
Migration paths exist from Playwright, Cypress, Selenium, Detox, and Maestro. Locators and assertions map closely enough that you're not rewriting everything from scratch. The framework extends with custom execution backends if you need something specific. Early adopters include people like Guillermo Rauch and teams at Expo who see this as where end-to-end testing is headed — a hybrid model that uses AI where it helps and deterministic code where it counts.