TesterArmy e2e: An Agentic E2E Testing Framework Where Replay Steps Need Zero Model Calls, and Decision Models Replace Full LLMs for Bounded Actions — aniketkarneai.com | aniketkarneai.com
Wednesday, November 11, 2026 Field notes on autonomous systems ● Amsterdam, NL
daily

TesterArmy e2e: An Agentic E2E Testing Framework Where Replay Steps Need Zero Model Calls, and Decision Models Replace Full LLMs for Bounded Actions

tester-army/e2e (Apache-2.0, 7,480★, 75 days old, six coordinated npm packages, 0.18.0 across the board on 2026-10-06) is an e2e testing framework where agent steps are natural language, replays are deterministic against a recorded action trace, and `@e2e-dev/decision` swaps the LLM for a probability-distribution decision model so the agent never generates free text. The interesting parts are the replay cache, the security model (rejection-based rather than sandboxing), and the parallel release cadence across web, mobile, kernel, github, eas, and decision.

There is a particular kind of test file I have written too many times: forty lines of Playwright clicks, a fixture that has to be re-recorded every time the checkout flow moves, a CI run that costs more in tokens than the feature it covers, and an assertion that depends on the exact wording of a button that the design team changes every other week. tester-army/e2e — Apache-2.0, 7,480★, 75 days old at run time, six npm packages with a coordinated 0.18.0 release across the board on 2026-10-06 — starts from a different premise. The test is natural language. The agent reads the accessibility tree, picks a tool, the runner authorizes the call, and the step records itself for replay. Next run, if the screen still matches the recording, no model is called. The cost profile of a 200-test suite collapses to the cost of the steps that actually broke since the last run, not the cost of the whole suite. That is the headline. The rest of the design is what makes the headline survive contact with a real codebase.

The release log tells you the project is alive in a way that star counts do not. e2e@0.18.0 (2026-10-06 12:50:29Z), @e2e-dev/web@0.13.0 (12:50:38Z), @e2e-dev/mobile@0.10.0 (12:50:35Z), @e2e-dev/kernel@0.2.0 (13:31:58Z), @e2e-dev/github@0.4.0 (12:50:32Z), @e2e-dev/eas@0.3.0 (13:31:55Z). Six packages, six version lines, all cut within 40 minutes of each other on the same day. The pre-1.0 0.18.0 line is the project iterating fast on its public surface — and the coordinated release across the whole monorepo is the price the maintainers pay to keep the engines and the runner from drifting. The kernel and eas versions are different (0.2.0, 0.3.0) because they have shipped less; the runner-side e2e, web, mobile, github are lockstep at 0.18.0 / 0.13.0 / 0.10.0 / 0.4.0. The cadence is the message.

The bet, in one sentence

Most “AI for testing” tools run the model on every step of every test, every CI run, forever. TesterArmy runs the model once per step the first time, records the action trace, replays it deterministically until the screen changes, and only then hands control back to the model. The cost of a stable test suite is the cost of the delta, not the cost of the whole suite. A separate @e2e-dev/decision package goes further: a probability-distribution decision model answers bounded choice questions (which element to tap, which option to select), a small language model writes field values, and the agent never generates free text. The full LLM stays on the shelf for judgments and for the cases where the screen surprises the executor.

The thing that makes the bet interesting is the split between what the runner knows and what the executor knows. From docs/agent-steps.mdx: “The runner handles redaction, action authorization, budgets, secrets, and reporting. The executor decides which actions to request and returns a verdict.” The contract is one socket. Custom executors get the same redacted observations, the same checked action methods, the same budgets. A team that wants Claude as the executor writes executor: claude(); a team that wants the decision model writes executor: decisionExecutor({...}); a team that wants a tap-only loop writes executor: createToolLoopExecutor({...}) and replaces the built-in tool vocabulary. The runner is the same in all three. The cost profile changes; the test file does not.

The trade-off is right there in the runner’s contract: an agent step returns one of three verdicts — passed, failed, or blocked — and a step that produces insufficient evidence returns ASSERTION_INCONCLUSIVE, which is a first-class outcome, not a hidden pass. A blocked step with the code BUDGET_EXHAUSTED is not the same as a failed step with the code ELEMENT_NOT_FOUND; the report records which one and the test exit code maps onto that. The cost of writing tests in natural language is the cost of writing tests that mean what you actually meant — and the framework makes the difference between “the model said pass without evidence” and “the screen proved pass” visible in the report.

What the framework actually is

A pnpm monorepo with seven packages under packages/, one CLI, one shared engine contract, and a single source of truth in AGENTS.md. The published surface:

PackageWhat it does
e2eThe SDK, runner, CLI, e2e/engine contract. Knows the contract; never an engine’s internals. The grep invariant — zero hits for Web, browser, page, route, playwright in src/ — is what enforces it.
@e2e-dev/webBrowser engine: Chromium, Firefox, WebKit through Playwright.
@e2e-dev/mobileiOS and Android engine: simulators and emulators through agent-device.
@e2e-dev/githubReporter that posts results as a pull request comment.
@e2e-dev/kernelHosted browsers for the web engine.
@e2e-dev/easHosted iOS simulators and Android emulators for the mobile engine.
@e2e-dev/decisionDecision-model executors for bounded semantic actions and assertions.

The contract is the same in all of them. A target is { engine, app: { url } }; an engine exposes the tools (tap, type, press, select, scroll, navigate, plus pixel tools screenshot and point when text snapshots cannot describe a control); the runner authorizes each tool call against the agent step’s budget and against the security policy. The CLI is npx e2e and the engine-agnostic test file is a TypeScript file with import { test, expect, credentials } from 'e2e'.

A test that uses only screen.getByRole and expect(...).toBeVisible() needs no model at all — the runner does not call the model, the model cost is zero, and the test runs at full Playwright speed. A test that uses agent.act('Add a todo named Buy coffee, and verify it is listed.') calls the model the first time, records the action trace, and on subsequent runs replays the trace as long as the screen matches. A test that uses agent.assert('The todo list contains Buy coffee.') always runs live — the model has to judge, not replay, so the cache is opt-out for that case by design.

The replay cache, in detail

The cache is the part of the design that is hardest to fake. From docs/cache.mdx: “The replay cache records the actions in an agent.act() step after a later check verifies the result. On the next run, the runner replays those actions without calling the model. If a control or the expected end state no longer matches, the agent takes over from the current screen.” A run summary line that the README quotes:

           AI  4.1k tokens · 2 model calls · anthropic/claude-sonnet-4.5
        Cache  4 replayed · 1 handed off · 1 missed

replayed (step.cache.mode: self-finalized) — the recording completed without a model call. handed off (agent-concluded) — replay started, the agent took over, the run completed. missed (missed) — the agent ran the step from the beginning, no replay was possible. The step.cache.reason field tells you which one and step.cache.detail tells you where the replay stopped (“at action 2 of 3, tap button ‘Apply’: …”). The trace page surfaces it all under the step. A developer staring at a CI failure sees exactly which action in which step diverged, with no model call needed to find it.

The replay machinery is the part that takes some reading to understand. The runner does not just “replay the actions in order.” It:

  1. Checks the starting screen. The route is the origin, the path, and the query. ?t=1727780000 and ?t=1727780999 are one route (cache-busters are read as an id placeholder); ?mode=safe and ?mode=unsafe are two routes. A route to a preview deployment that shares the app’s identity is the same route; a route to any other origin is a different one.
  2. Finds each recorded control by its role, name, test id, and surrounding context, and waits for missing controls up to the action’s 15-second timeout. An unnamed control is found by its place among the unnamed controls of its kind inside the same named row or list item. With no such container, the agent takes over.
  3. Checks the final route and what the original step changed: controls that appeared, their checked/selected/expanded/pressed state, and the ones that went away. At least one of those changes must happen during the replay — counted from the first screen the replay saw on the route it ended on. An outcome already on screen before the actions that should produce it proves nothing.
  4. Finishes without a model call, or hands control to the agent with a record of what ran and why replay stopped.

The third rule is the one that catches most of the false-positive cases I would have written if I were building this. A step whose last action moved to another route has that move as its evidence; a step whose last action stayed on the same route has to demonstrate that something the actions caused actually appeared, or that something the actions cleared actually went away. A counter that was already on screen and only moved from 41 to 42 is not a sufficient end state for a step that supposedly created the counter; a counter that says “3 records imported” and was not there before the actions is.

The step.cache.write field tells you what happened to the recording after the attempt:

step.cache.writeMeaning
savedRecorded for the next run.
keptThe entry stays as it is.
unconfirmedNot saved: no check passed after the step. Follow it with a locator assertion or agent.assert.
evictedThe entry was deleted: replay ended in a failure or a repair, or no check confirmed it before the attempt failed.
no-changeNothing recorded: the step changed nothing a replay could check.
not-writtenNot saved: the store did not write the recording (e.g. past the file store’s size limit).

The unconfirmed state is the most interesting one. A step that does not have a follow-up expect or agent.assert is treated as a no-credential and its recording is dropped. The framework refuses to silently cache a step that nobody checked.

The decision model, in detail

The @e2e-dev/decision package is the second piece of the cost story, and the part that surprised me. From docs/decision-models.mdx: “For each action the decision model answers one request: which operation, and which element for each operation that has more than one, chosen from what the executor builds out of the latest semantic tree. It never generates free text: when the choice is type, a small language model writes the field value.”

The wiring is plain AI SDK models. The decision model provider answers choice questions with probability distributions; the framework’s example uses the Jev system (we covered it on 2026-09-20) as the decision model, but the design is provider-agnostic — any decision model that returns bounded choices works. The text model is a separate language model (the example uses openrouter('inception/mercury-2.5')); it writes the value when the decision model picks type. Both are wired through @ai-sdk/* adapters, so the runner still authorizes every dispatched action and the security model is unchanged.

The interesting part is what the decision model is not allowed to do. From the docs: “Model output never becomes a selector, a URL, or a key. When the goal supplies no value, nothing is typed and the decision model picks another action. Password fields never reach the text model; secrets stay declared handles that only typeSecret fills.” The decision model only ever names an element index; the text model only ever writes field values. The model cannot navigate to file: or data: (the policy refuses); the model cannot construct a selector; the model cannot synthesize a key. The agent’s output is forced into a closed set of operation/element pairs, and the runner is the only thing that turns a pair into an action.

A test that uses the decision executor looks identical to a test that uses the LLM executor. Same agent.act('Add a todo named Buy coffee, and verify it is listed.'). Same agent.assert. Same expect calls. The cost on the wire is one or two decision-model calls per step instead of one full LLM call; the determinism on a stable screen is a property of the cache, not the executor. The split is cost × determinism × flexibility, and the framework gives the team the dial.

The security model, in detail

The docs/security.mdx page opens with a sentence the team did not have to write: “Test code and configuration run with your operating-system permissions. This includes engines, tools, reporters, stores, secret providers, and app commands. e2e does not sandbox them. Run untrusted pull request code in an external sandbox without secrets or write tokens.”

The model receives app content as untrusted evidence. The runner validates and performs every action the model requests. The trust boundary is the boundary, and the design refuses to blur it. The denied list (from the docs) is the part that tells you the project is being honest about the threat model:

DeniedWhy
Navigation to any scheme but http: and https:, other than about:blankfile:, data:, javascript:, and wrappers such as view-source:file: would load local or inline content.
A malformed URLNothing is repaired.
A Secret reaching a JSON sinkHandles carry no value, and no value may be serialized.
Reading a value from a secure field, with a getter or a toHaveValue / toHaveText / toContainText / toHaveAttribute matcherAssert the outcome, not the secret. A withheld value is redacted, not empty or absent.
type_secret with an undeclared nameOnly secrets in the step’s params can be filled.
type_secret into a disabled or non-editable nodeSinks are textbox, searchbox, and combobox.
A password into a field that is not a password fieldPurpose must match; a generic secret fills any editable input.
A project tool not made with defineTool, or without executeUndeclared semantics are not trusted.
A mutating project tool requesting an observationObserve in a separate call.
vision: 'only' when pixels are withheldThere is nothing to fall back to.
app.screenshot() after a secret fillThe app may display the secret outside a secure field.

The screenshot rule is the one I would not have written, and the one I am glad is there. After a type_secret call, the app may render the typed value into a div somewhere the model cannot see through the accessibility tree. The runner refuses to send a screenshot to the model after a secret fill, full stop. The team picked a denial over a heuristic. That is the design.

The hostname-based site check has a paragraph that does the same thing. From the docs: “Shared hosting domains such as vercel.app count as one site, so headers can reach other hosts under that domain.” The check is approximate, the docs say so, and the team did not pretend the approximation is a guarantee. Headers configured for a Vercel preview will reach a sibling Vercel app on the same domain. The team calls it out by name because in 2026 a security claim that says “this is airtight” is a security claim the next bug report will falsify.

Trade-offs and what it doesn’t fix

Three honest limits, one per paragraph.

The replay cache is only as good as the action trace. A step whose end state is “the user sees a confirmation” with no locator assertion or agent.assert after it is unconfirmed — the recording is dropped, the next run is a model call. The framework refuses to cache the uncheckable, which is the right call, but it also means the team’s discipline is the variable that determines the cache hit rate. A test suite that follows every agent.act with a screen.getByTestId(...) or an agent.assert will get the cost profile the README advertises; a test suite that ends each test with expect(true).toBe(true) will not.

The decision model is provider-bound. @e2e-dev/decision needs ai 7.0.128 or later and a decision model provider that answers choice questions with probability distributions. The Jev-based example is the path of least resistance today (and the reason the September 20 post is referenced from the docs); the contract is generic enough that other providers will land, but the team has not built a second executor yet. A project that picks a different decision model provider is signing up for “the framework supports it in principle, the wiring is your problem.”

The runner is not a sandbox. The docs open the security page with the sentence that says it. Test code, configuration, engines, tools, reporters, stores, secret providers, and app commands run with the developer’s OS permissions. A malicious pull request that adds a defineTool whose execute reads process.env and POSTs the contents to an attacker server will succeed. The framework’s defense is the rejection-based policy, not containment. The docs explicitly tell you to run untrusted pull request code in an external sandbox. This is the right design — pretending the runner is a sandbox would be the wrong one — but a team that expects the test runner to defend the host is going to be surprised.

Open question

The replay cache is the part that is hardest to evaluate without a long-running test suite in front of you. The README claims 4-replayed / 1-handed-off / 1-missed on a sample step; the docs explain the four transitions a recording can take (saved / kept / unconfirmed / evicted / no-change / not-written); the team has published a step.cache.reason field for every mode. What I have not seen in the public material is a benchmark of cache hit rate vs. project age — how the cache behaves on a one-week-old project, a one-month-old project, and a one-year-old project, on the same test suite. The hit rate is the variable that determines whether the framework is “the cost of running your test suite” or “the cost of running your test suite divided by some constant.” That number, on a real codebase, over months, is the post I would read next.

References and where to dig further

  • tester-army/e2e — main repo, Apache-2.0, 7,480★ at run time, six-package monorepo.
  • docs/agent-steps.mdx — what the model sees, what it may do, how a step ends, and the budget rules.
  • docs/cache.mdx — the replay cache, the replayed / handed off / missed summary, the saved / kept / unconfirmed / evicted outcomes.
  • docs/decision-models.mdx — @e2e-dev/decision package, Jev and Mercury wiring, the closed-set constraint on model output.
  • docs/security.mdx — the rejection-based policy table, the screenshot-after-secret-fill rule, the “not a sandbox” honesty.
  • docs/coding-agents.mdx — the skill installed by e2e init, the e2e mcp server, the AGENTS.md pointer.
  • AGENTS.md — the contracts (the published .d.ts, the wire-format JSON Schemas, the security invariants) and the “no RFCs, the code is the contract” posture.
Aniket Karne
DevOps & AI Engineer · Amsterdam
Back to all posts
Reader correspondence

Comments

Powered by GitHub Discussions via Giscus. Sign in with GitHub to leave a comment.