diff --git a/docs.json b/docs.json index 5e523bf8..f6dc7bb4 100644 --- a/docs.json +++ b/docs.json @@ -285,6 +285,7 @@ ] }, "integrations/hermes-agent", + "integrations/e2e", "integrations/laminar", "integrations/replit", "integrations/stagehand", diff --git a/images/integration-icons/tester-army.png b/images/integration-icons/tester-army.png new file mode 100644 index 00000000..95e37a2c Binary files /dev/null and b/images/integration-icons/tester-army.png differ diff --git a/integrations/e2e.mdx b/integrations/e2e.mdx new file mode 100644 index 00000000..454ba74e --- /dev/null +++ b/integrations/e2e.mdx @@ -0,0 +1,56 @@ +--- +title: "e2e" +description: "Run agentic end-to-end tests in Kernel cloud browsers" +icon: "/images/integration-icons/tester-army.png" +--- + +[e2e](https://e2e.tester.army/docs) is an end-to-end testing framework for web and mobile apps. It combines natural-language agent actions and assertions with deterministic locator assertions. With the Kernel browser provider, your web targets run in hosted Chromium. + +## Install the provider + +Install the Kernel provider and SDK alongside e2e: + + +```bash npm +npm install --save-dev @e2e-dev/kernel @onkernel/sdk +``` + +```bash pnpm +pnpm add -D @e2e-dev/kernel @onkernel/sdk +``` + +```bash bun +bun add -d @e2e-dev/kernel @onkernel/sdk +``` + + +## Configure a Kernel browser + +Use `kernel()` as the browser for your web target: + +```ts title="e2e.config.ts" +import type { E2EConfig } from "e2e"; +import { web } from "@e2e-dev/web"; +import { kernel } from "@e2e-dev/kernel"; + +export default { + targets: [ + { + name: "kernel", + engine: web({ + browser: kernel({ viewport: { width: 1920, height: 1080 } }), + viewport: null, + }), + app: { url: "https://staging.example.com" }, + }, + ], +} satisfies E2EConfig; +``` + +Set `KERNEL_API_KEY` in the environment where `e2e run` starts, such as a CI secret. By default, e2e leases one hosted browser per worker and releases the browsers when the run ends. Use `scope: "attempt"` in `kernel()` when each test attempt needs its own browser. + +For browser options, scopes, recordings, downloads, and cleanup behavior, see the [full e2e Kernel integration guide](https://e2e.tester.army/docs/integrations/kernel). + + +See the [e2e + Kernel cookbook](https://github.com/kernel/cookbooks/tree/main/integrations/e2e-kernel) for a complete runnable example. + diff --git a/integrations/overview.mdx b/integrations/overview.mdx index 4f9ffdc9..522b4ecc 100644 --- a/integrations/overview.mdx +++ b/integrations/overview.mdx @@ -31,6 +31,7 @@ Kernel provides detailed guides for popular agent frameworks: - **[fx](/integrations/vercel/fx)** - Give Vercel's fx coding agent a Kernel cloud browser via MCP - **[Browser Use](/integrations/browser-use)** - AI browser agent framework - **[Hermes Agent](/integrations/hermes-agent)** - Run Hermes browser tools on Kernel cloud browsers +- **[e2e](/integrations/e2e)** - Run agentic end-to-end tests in Kernel cloud browsers - **[Claude Code and Desktop](/integrations/claude/claude-code-and-desktop)** - Give the Claude apps a Kernel browser via the marketplace plugin or MCP - **[Claude Agent SDK](/integrations/claude/claude-agent-sdk)** - Run Claude Agent SDK automations in cloud browsers - **[Claude Managed Agents](/integrations/claude/claude-managed-agents)** - Run Anthropic's hosted agent harness against cloud browsers