tester-army / e2e
e2e: An Agentic End-to-End Testing Framework
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.
e2e 是一个用于 Web 和移动端应用的端到端测试框架。你只需用自然语言描述目标,智能体(Agent)就会驱动应用去实现它,并在同一个测试中通过定位器(locators)和断言(assertions)来检查结果。
// 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.
当后续断言验证了某个智能体步骤后,系统会记录其操作;在下一次运行时,除非应用发生变化,否则系统会直接重放这些操作,无需再次调用模型。不包含智能体步骤的测试则完全不需要模型。你可以使用自己的订阅、API 密钥或本地模型。
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.
快速开始
npx e2e init
该命令会询问你选择引擎(Web 或移动端)以及模型提供商,随后生成配置文件和一个示例测试。其余内容可参考快速入门指南。
Packages
| 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/github | Reporter that posts results as a pull request comment. |
| @e2e-dev/kernel | Kernel hosted browsers for the web engine. |
| @e2e-dev/eas | EAS Simulators hosted iOS simulators and Android emulators for the mobile engine. |
| @e2e-dev/decision | Decision-model executors for bounded semantic actions and assertions. |
软件包
| 软件包 | 功能描述 |
|---|---|
| e2e | SDK、运行器和 CLI。 |
| @e2e-dev/web | 浏览器引擎:通过 Playwright 支持 Chromium、Firefox 和 WebKit。 |
| @e2e-dev/mobile | iOS 和 Android 引擎:通过 agent-device 支持模拟器。 |
| @e2e-dev/github | 报告器:将测试结果发布为 Pull Request 评论。 |
| @e2e-dev/kernel | Web 引擎的内核托管浏览器。 |
| @e2e-dev/eas | 移动引擎的 EAS 托管 iOS 模拟器和 Android 模拟器。 |
| @e2e-dev/decision | 用于有界语义操作和断言的决策模型执行器。 |
Documentation
e2e.tester.army/docs. The e2e package ships every page, so coding agents can read them offline in node_modules/e2e/docs.
文档
访问 e2e.tester.army/docs。e2e 软件包中包含了所有文档页面,因此编码智能体可以在 node_modules/e2e/docs 中离线读取它们。
Contributing
See CONTRIBUTING.md. Questions go to Discord.
贡献
请参阅 CONTRIBUTING.md。如有疑问,请前往 Discord。
Security
Please don’t open public issues for security vulnerabilities. Follow SECURITY.md and report them to security@tester.army.
安全性
请勿公开提交安全漏洞问题。请遵循 SECURITY.md 的指引,并将漏洞报告发送至 security@tester.army。
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.
遥测
CLI 会发送匿名使用数据(例如运行了哪些命令和引擎,以及在何处运行失败),但不会发送测试内容、应用内容或凭据。你可以通过 npx e2e telemetry disable 或设置 E2E_TELEMETRY_DISABLED=1 来禁用遥测。遥测文档中列出了所有采集的字段。
Status
Note: e2e is in active development on the way to 1.0. APIs and config can still change between minor releases.
状态
注意:e2e 正处于迈向 1.0 版本的积极开发阶段。API 和配置在小版本更新中仍可能发生变化。
Made by TesterArmy
e2e is built by TesterArmy, the agentic testing platform that runs natural language tests on web and mobile apps, on every pull request or on a schedule. Apache-2.0.
由 TesterArmy 开发
e2e 由 TesterArmy 构建,这是一个智能体测试平台,可在每次 Pull Request 或按计划自动运行 Web 和移动应用的自然语言测试。采用 Apache-2.0 协议。