Sulat.com / Writing on AIThursday, December 3, 2026
Enter →
Agent Engineering/3 December 2026

e2e Desktop tests native Mac apps with the same API as the web

e2e's experimental macOS engine drives native apps through the accessibility tree. It needs a Mac, so I ran the same agent API on its web engine with five models, and one agent step reported success on an order it never placed.

3D blue e2e logo beside a desktop sign-in window linked to an accessibility tree
Illustration: Sulat, featuring the e2e logo

At a glance

  • e2e has released @e2e-dev/desktop, an experimental engine that tests native macOS apps through the accessibility tree with the same agent, screen and expect API as its web and mobile engines.
  • The driver is written in Rust and loads into the test process, so there is no separate process between a test and the app.
  • e2e's own benchmark has it about four times faster than XCUITest and Appium Mac2 on one sign-in flow. The engine runs only on macOS 13 or later, so I couldn't repeat the number.
  • On Linux I ran the same API on the web engine: DeepSeek, Kimi, GPT-6.2 Sol and Gemini 4 Neon passed all nine agent runs, and Haiku passed six.
  • Haiku's agent step reported success three times on a checkout it never completed, and only the locator check after it caught that.

e2e has released @e2e-dev/desktop, an engine that tests native macOS apps. It reads and drives an app through the operating system’s accessibility tree, and a test uses the same agent, screen and expect calls it uses on the web or on a phone. e2e calls the engine experimental and says its own benchmark has it about four times faster than XCUITest and Appium on one sign-in flow.

The engine runs only on macOS 13 or later, and my test machine runs Linux. I confirmed what the engine does when it’s pointed at the wrong system, then ran the same API on e2e’s web engine: three tasks, five models, three runs each, plus the replay cache and a timing check. Every model completed the sign-in and the three-step upgrade. One of them reported success on a checkout it never finished.

What shipped

e2e started as TesterArmy, a company that ran a testing agent against other teams’ apps, and open-sourced the framework under Apache 2.0 on 1 October as e2e for web, iOS and Android. It took the e2e name and an US$8 million seed round, led by Credo Ventures, in November. The Electron engine arrived on 30 November. The desktop engine is the next one in what the company is calling launch week.

Install is two packages, and the config points at a built .app:

Code
npm install --save-dev e2e @e2e-dev/desktop
npx e2e init --yes --engine desktop

Whatever starts e2e (a terminal, an IDE or a CI agent) needs Accessibility and Screen Recording permission in System Settings, and npx e2e doctor checks both. A test then reads like any other e2e test. This is the example from e2e’s post:

Code
import { test } from "@e2e-dev/desktop";
import { credentials, expect } from "e2e";

test("signs in", async ({ app, screen }) => {
  const ada = credentials.user("ada");
  await app.open();
  await screen.getByRole("textbox", "Username").fill(ada.username);
  await screen.getByRole("textbox", "Password").fill(ada.password);
  await screen.getByRole("combobox", "Plan").selectOption("Team");
  await screen.getByRole("button", "Sign in").tap();
  await expect(screen.getByTestId("status")).toContainText("Signed in as ada");
});

Roles use the names the web uses: textbox, checkbox, combobox, button. Agent steps such as agent.act work too, and a coding agent can write the tests, because init also scaffolds an agent skill, an AGENTS.md and CLAUDE.md pointer, and MCP config for Claude Code, Cursor and Codex. The MCP server’s live sessions cover web, iOS and Android. The README doesn’t list desktop among them.

How it works

The earlier architecture post described engines written in a native language that talk to the runner over JSON-RPC. The desktop engine doesn’t. Its driver is Rust, loaded into the test process through napi-rs, so a tap is a function call and not a message to another process. DongYun Kang, the creator of swc, wrote the post and gave the reasons for Rust over Swift: a Swift driver would have needed JSON-RPC and its round trip on every action, two garbage-collected runtimes in one program are hard to keep in step, and napi-rs wraps most of the unsafe code a native addon needs. He says he didn’t profile the Swift option.

Stack: test, e2e runner, Rust driver, macOS accessibility, app
The Rust driver runs inside the test process, so there is no extra hop. Illustration: Sulat

Two design choices matter more to a developer than the language. By default the app opens in the background and actions go through the Accessibility API, not the real pointer and keyboard, so your mouse stays yours while tests run. XCUITest and Appium bring the app to the front. And the app under test gets a minimal environment: your secrets, model keys and CI tokens aren’t passed to it. Password fields never expose their value and are painted black in screenshots, and a screenshot that can’t cover one fails instead of saving.

e2e’s benchmark

e2e ran one sign-in flow on a native AppKit form through five tools: type a username and password, tick Remember me, choose Team in a pop-up, click Sign in, quit. Every wait polls every 50 milliseconds. e2e normally sets a field’s value through accessibility in one step, which isn’t a fair match for XCUITest typing key by key, so the headline figure uses physicalInput: true, which types and clicks the way they do.

Bar chart: e2e Desktop 1.34 s, XCUITest 5.61 s, Appium Mac2 5.70 s, AppleScript 0.93 s
e2e’s own numbers for one sign-in flow with real clicks and typing. Illustration: Sulat
ToolLaunchFillCheckSelectSubmitQuit
e2e (physicalInput)271 ms324 ms89 ms439 ms125 ms103 ms
XCUITest387 ms1.39 s559 ms1.69 s556 ms1.04 s
Appium Mac2429 ms1.13 s650 ms1.81 s641 ms1.05 s
Median step times from e2e’s benchmark. In its default mode, with no typing, e2e takes 1.03 s for the whole flow.

The gap is mostly in typing and in the pop-up. AppleScript through System Events is faster than all of them at 0.93 seconds, and e2e calls it the floor, not a competitor, since it has no auto-waiting, locators, reports or screenshots. The run was on an Apple M5 Pro with e2e 0.25.0, and the code is in a public gist with the Xcode and Appium setup it needs. e2e says the test is one simple form on one machine, measures speed only, and that the engine hasn’t been optimised yet.

What it can’t do yet

  • It runs on macOS 13 or later only. Windows and Linux are planned.
  • It drives native controls. Browser windows, Electron apps and web views aren’t supported.
  • The app’s menu bar isn’t readable yet, so menu items are triggered with a key shortcut.
  • There is one worker per desktop target, and doubleTap, hover and coordinate taps need physicalInput: true, which brings the app forward.
  • dragTo, longPress, setInputFiles, getByPlaceholder, app.clearState() and video recording fail with a message that says so.
  • Options and behaviour can change in any release, so e2e tells users to pin the package to an exact version.

Where it sits

Each e2e engine is a separate package behind one engine interface, and which one a team needs depends on what the app is made of.

Appe2e engine
Website@e2e-dev/web: Chromium, Firefox and WebKit through Playwright
iOS or Android@e2e-dev/mobile: simulators and emulators through agent-device
Electron@e2e-dev/electron: Chrome DevTools Protocol and Chromium’s accessibility tree
Native macOS@e2e-dev/desktop: Rust driver over the macOS accessibility API
Native Windows or LinuxNone yet
The engines e2e ships, from its README and docs.

For a native Mac app the alternatives are Apple’s own XCUITest, which needs an Xcode project and a test bundle, and Appium with its Mac2 driver, which compiles WebDriverAgentMac the first time it connects. e2e’s comparison pages cover Playwright, Selenium, Maestro and Detox. They don’t cover XCUITest or Appium, and the site points Appium users to its Selenium, Detox and Maestro guides. The selling point against both Apple tools is one API across platforms, tests in TypeScript, and an agent step when scripting a flow is more work than describing it.

The framework is free and Apache-licensed. Dealroom’s write-up of the seed round says the money goes on hosted test infrastructure expected in 2027. The CLI sends anonymous usage data, and E2E_TELEMETRY_DISABLED=1 turns that off.

What I ran

First, the engine on the wrong system. npm install on Linux succeeded and pulled in the JavaScript package, not the two macOS driver packages. npx e2e init --yes --engine desktop printed that desktop doesn’t run on this operating system and still wrote the config. npx e2e doctor and npx e2e run then stopped with the same message:

Code
ERROR  configuration error UNSUPPORTED_CAPABILITY (launch)
desktop() is not supported on linux: it drives macOS apps only

That’s the behaviour e2e documents, and it means a repo with a desktop target still runs its other targets on Linux CI when you pick them with --target. It also means I didn’t run the desktop engine or repeat the four-times figure.

What I could run is the API that’s meant to be identical. I built a small local site with three pages and ran e2e 0.26.1 with its web engine in Chromium. The agent models were DeepSeek V4.1 Flash through Morph, Kimi K3.1 Pro through Synthetic, and Claude Haiku 5.5, GPT-6.2 Sol and Gemini 4 Neon through their own APIs, all through the AI SDK with the cache switched off. Each task ran three times per model. The sign-in page copies e2e’s benchmark flow, and the other two add steps. Here are the exact prompts, each passed to agent.act:

Code
sign in as user ada with the password hunter2, tick Remember me and choose the Team plan

upgrade the workspace to 3 seats on annual billing with promo code SAVE20, then confirm the upgrade

order the lamp with express shipping and the gift note "Happy birthday", declining any optional cookies

Every test ends with a locator check on the page’s status text, such as expect(screen.getByRole('status')).toContainText('Ordered: express, total $52, note "Happy birthday"'), so a run only counts when the page says so. The checkout page opens behind a cookie dialog, and its Place order button stays disabled until the terms box is ticked.

Test checkout page covered by a cookie dialog, Place order button disabled
The checkout page I built for the third task, as the agent first sees it. Screenshot: Sulat
ModelRuns passedMedian agent step: sign-in, upgrade, checkoutModel calls, nine runs
DeepSeek V4.1 Flash9 of 95.5 s, 6.0 s, 5.5 s38
Kimi K3.1 Pro9 of 913.8 s, 10.8 s, 11.0 s34
Claude Haiku 5.56 of 99.0 s, 5.4 s, 2.7 s42
GPT-6.2 Sol9 of 911.0 s, 11.7 s, 9.2 s60
Gemini 4 Neon9 of 920.5 s, 30.8 s, 36.0 s30
Three runs per task and model, so this is a smoke test, not a benchmark.

Four models passed every run. DeepSeek was the quickest per step, Neon used the fewest model calls and was the slowest by a wide margin, and Sol passed all nine with the most calls. The spread between models is in speed and call count, not in whether the form got filled.

A passed step that wasn’t

Haiku failed the checkout task in all three runs, and the failure is the useful part. The agent step reported passed after two model calls and 2.7 seconds. The page still said “Not ordered”. The trace shows it declined the cookies, picked Express shipping, typed the gift note and stopped. It never ticked the terms box or pressed Place order. Without the locator check after it, that test would have gone green.

Agent step passed, page still says Not ordered, locator check failed
Haiku’s agent step passed in all three runs. The locator check after it did not. Illustration: Sulat
Terminal output: agent step passed, then toContainText failed with Not ordered
Run output from the first Haiku repeat, trimmed. Screenshot: Sulat

e2e’s docs warn about this. A silent save with no visible confirmation can end a step as failed, and the docs advise telling the agent how to confirm it. They also say to end every test with an assertion. My prompt didn’t name the last two actions, so I ran Haiku again with a prompt that did:

Code
order the lamp with express shipping and the gift note "Happy birthday", declining any optional cookies, then agree to the terms and place the order

That passed three runs out of three. Each agent step took about 35 seconds and five or six model calls, against 2.7 seconds for the version that stopped early. The model that stopped early was the quick one.

Replay and overhead

The replay cache is the part that matters for CI. With it on, a passing agent.act step that a later check confirms is recorded, and the next run replays the actions with no model call. I ran the sign-in and upgrade tests twice with DeepSeek. The first run took 5.7 and 6.3 seconds in the two steps, with three and seven model calls. The second run replayed both from the cache in 2.7 and 1.0 seconds with no model calls.

For overhead I ran the locator-only sign-in test 23 times in e2e and the same flow 23 times in a plain Playwright script, each in a fresh browser context, and dropped the first three of each. e2e’s median was 412 milliseconds per test and Playwright’s was 197. That’s the web engine on Linux, so it says nothing about the desktop numbers, but it’s the cost of the runner around a flow this small.

How to use it

  1. Check the app first. Native controls suit the desktop engine. An Electron app wants @e2e-dev/electron, and a web view wants the web engine.
  2. Give the terminal, IDE or CI agent Accessibility and Screen Recording permission, then run npx e2e doctor.
  3. Pin @e2e-dev/desktop to an exact version with no caret.
  4. End every test with a locator assertion, and name the last action in every agent prompt.
  5. Commit the replay cache and run CI with --strict-cache, so a stale recording fails the step and no model takes over.
  6. Repeat the benchmark on your own app before you plan around four times. e2e publishes the code.

My runs are one local site, three tasks and three runs per model on the web engine, so the pass counts, timings and the Haiku result are a smoke test. They show the API behaves the same way across five very different models and that its checks catch a model that stops early. The desktop numbers are e2e’s.

Disclosure: I’m an OpenAI, Firecrawl and Devin ambassador.