e2e README

项目的 README,来自 github.com/e2e-inc/e2e。合并为一个 markdown 文件:README.md。

e2e, the agentic testing framework

npm version License: Apache-2.0 Join the community on Discord

e2e-inc/e2e | Trendshift

e2e

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');
});

An agent step that a later assertion verifies records its actions, and the next run replays them with no model calls until the app changes. Tests without agent steps need no model. Bring your own subscription, API key, or local model.

Quick start

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.

Packages

Core

Package What it does
e2e The SDK, runner, and CLI.
@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/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.

Integrations

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/lightpanda Lightpanda, the open-source headless browser, started per run for the web engine.
@e2e-dev/smol smol machines browsers for the web engine: by default, each attempt branches a warm Chromium microVM.
@e2e-dev/testmu TestMu AI (formerly LambdaTest) hosted Android emulators, iOS simulators, and real devices for the mobile engine, and hosted Chrome and Edge for the web engine.
@e2e-dev/e2b E2B sandboxes: Android 16 for the mobile engine, and Chromium for the web engine.
@e2e-dev/browserstack BrowserStack App Automate real Android and iOS devices for the mobile engine.
@e2e-dev/limrun Limrun hosted iOS simulators and Android emulators for mobile tests.
@e2e-dev/eas Expo Simulators hosted iOS simulators and Android emulators for the mobile engine.
@e2e-dev/github Reporter that posts results as a pull request comment.
@e2e-dev/html-reporter Reporter that writes the run as one HTML page, with steps, screenshots, and video.

Community

See Community packages for third-party integrations and how to add yours.

Documentation

e2e.com/docs. The e2e package ships every page, so coding agents can read them offline in node_modules/e2e/docs.

Join us

Join us in changing how software gets tested. We are hiring.

Questions? Ask on Discord. Issues are for bugs and feature requests.

Want to hack on e2e? See Contributing. We prefer an issue or a Discord discussion before a pull request.

Security

Please don't open public issues for security vulnerabilities. Follow SECURITY.md and report them to [email protected].

Telemetry

The CLI sends anonymous usage data, such as which commands and engines run and where runs fail, but no test content, app content, or credentials. Opt out with npx e2e telemetry disable or E2E_TELEMETRY_DISABLED=1. Telemetry lists every field.

Status

[!NOTE] e2e is in active development on the way to 1.0. APIs and config can still change between minor releases.

e2e (e2e-inc/e2e)

正在搜索数据库…

14K ·GitHub
这是什么?e2e 是一个面向 Web 和移动应用的端到端测试框架。你用自然语言描述一个目标,由智能体驱动应用去达成它,你再在同一个测试里用定位器和断言来检验结果。
这是一个包还是多个包?它是框架,还是只是一个 SDK?它拆分成多个包:核心的“e2e”包提供 SDK、测试运行器和 CLI,另有独立的引擎包分别用于 web(通过 Playwright 支持 Chromium、Firefox、WebKit)和 mobile(通过 agent-device 支持 iOS/Android),还有可选的 reporter 和 hosting 包。
怎么写我的第一个测试?运行 CLI 的 init 命令:它会询问你要用哪个引擎(web 或 mobile)和哪个模型提供商,然后生成一个配置文件和一个可供扩展的示例测试。
运行测试需要特定的 AI 提供商吗?不要求特定的提供商。智能体步骤可以使用你自带的订阅、API 密钥或本地模型。
每次运行时每个测试都会调用 AI 模型吗?只有由智能体驱动的步骤才会在第一次运行时调用模型;一旦断言验证了该步骤,它的动作就会被记录下来,之后的运行直接回放,不再调用模型,直到应用发生变化。完全不含智能体步骤的测试则从头到尾都不需要模型。
它支持哪些浏览器和移动平台?Web 测试通过 Playwright 运行在 Chromium、Firefox 和 WebKit 上;移动测试通过 agent-device 引擎运行在 iOS 和 Android 模拟器/仿真器上。
CLI 会把我的测试数据发送到别处吗?CLI 会发送匿名使用遥测数据(涉及运行了哪些命令和引擎、运行在何处失败),但绝不会发送测试内容、应用内容或凭据,而且你可以选择退出。
有没有办法让我不必自己运行浏览器或仿真器?有:@e2e-dev/kernel 为 web 引擎提供托管的浏览器,@e2e-dev/eas 为移动端提供托管的 iOS 模拟器和 Android 仿真器。
e2e 已经稳定到可以用于生产环境了吗?还没有完全稳定;该项目仍在朝 1.0 版本积极开发中,README 警告 API 和配置在次版本之间仍可能变化。
作者
e2e-inc
大小
116.6 MB
星标
14K
时长
3个月
提交 · 90 天