A new open-source testing framework called e2e is trying to blur the line between automated UI testing and AI-driven interaction. The project, written in TypeScript, lets developers write tests where an AI agent performs actions on the page while traditional assertions verify the results.
The core idea is simple. Instead of writing selectors and click sequences to navigate an application, you tell an AI agent what to do in plain language, then assert on the outcome. The framework handles the translation between intent and DOM interaction.
What the API looks like
The test function receives three arguments: an app object for navigating to pages, an agent object for performing actions, and a screen object for querying the DOM. A test that upgrades a workspace to a paid plan looks like this:
import { test, expect } from 'e2e';
test('upgrade to Pro', async ({ app, agent, screen }) => {
await app.open('/settings/billing');
await agent.act('upgrade the workspace to Pro');
await expect(screen.getByRole('status'))
.toContainText('Pro');
});
The agent receives a natural language instruction and figures out which buttons to click, which fields to fill, and which confirmations to accept. The assertion at the end uses a familiar query model to check that the UI reflects the expected state.
Why this matters for testing
Traditional end-to-end tests break when UI elements change. A button gets a new class name, a modal moves to a different location, a form adds a step, and the test fails even though the application works fine. Developers spend significant time maintaining selector chains and interaction sequences that are brittle by nature.
An AI agent that understands "click the upgrade button" does not care what the button is called in the DOM. It looks at the page, identifies the element that matches the intent, and interacts with it. When the UI changes but the intent stays the same, the test keeps working.
The tradeoff is speed and determinism. Traditional selectors execute in microseconds. An AI agent parsing a page and deciding what to click takes orders of magnitude longer. For a suite of hundreds of tests, that gap matters. The framework positions AI-driven actions as complementary to, not a replacement for, conventional testing.
Web, mobile, and beyond
The project describes itself as customizable for web, mobile apps, and more. The TypeScript foundation means it can target browser-based applications through Playwright or similar drivers, and the agent layer abstracts the interaction model away from the specific platform.
Mobile testing has long suffered from the same fragility as web testing, with selectors tied to view hierarchies that change between app versions. An intent-based agent approach could reduce that maintenance burden, though the framework's mobile capabilities are less documented than its web support.
The open question
The framework is open source, which means teams can inspect how the agent layer works, customize its behavior, and contribute adapters for their specific stack. The TypeScript API is deliberately minimal, giving developers control over how tests are structured without imposing opinionated patterns.
The bigger question is where AI-driven testing fits in a CI pipeline. Running a test that calls an LLM for every action introduces latency, cost, and non-determinism. A test that passes today might fail tomorrow not because the application changed, but because the model produced a different interpretation of the same instruction. Teams adopting this approach will need to think about retry logic, result caching, and how much of their test suite should rely on agent-driven interaction versus traditional automation.
For now, e2e represents a bet that the next generation of testing tools will look less like selector libraries and more like intent interpreters. Whether that bet pays off depends on whether AI agents can be fast, cheap, and reliable enough to run in continuous integration at scale. The framework gives developers the pieces to find out.