Coding agents

A test suite your coding agent can afford to run.

Coding agents change a lot of code quickly. Stresseur gives them real end-to-end API tests that finish in seconds, so the agent can check its work after every change, not just before merge.

Why agents need fast tests

An agent that edits a route, a handler and a migration in one go needs to know whether the checkout flow still works. If the only end-to-end check is a slow browser suite, it gets skipped. If it finishes in seconds, it runs every time.

On one shop journey, 10 runs of the API flow took 2.2 s; 10 runs of the same journey as a browser test took 11.2 s. After an API change broke both, the same agent got the flow green in a median 21 s and the browser test in 61 s.How we measured.

Stresseur tests run at the API level against your local app. They cover the flows your users actually take because they are generated from recorded, real usage.

What the agent gets

  • Real flows: tests built from API calls recorded while you use the app in dev.
  • Readable tests: YAML files in your repo that you and the agent can both read and edit.
  • A clear loop: record, generate, run, fix, rerun.
  • Failures that name the step: the step and the server's answer, so the agent knows what to fix.

Set it up

Install the CLI and the dev-only recorder in your app's project:

npm install -D stresseur stresseur-recorder

Start the recorder in your app's browser entry point, in development only:

import { StresseurRecorder } from 'stresseur-recorder';

if (process.env.NODE_ENV !== 'production') {
  StresseurRecorder.init({ endpoint: 'http://127.0.0.1:3737/ingest' });
}

Install the Stresseur skill for your coding agent:

npx stresseur install-skill

Record a session while you use your app, then generate tests from it:

npx stresseur record
npx stresseur generate

From there, ask the agent to run the tests after each change. The skill tells it how to record new flows, decide which ones are worth keeping, and regenerate tests. See theCLI reference.

On every PR, too

The same flows run in GitHub Actions on every pull request (npx stresseur init-ciwrites the workflow). Stresseur compares each run with main and posts a check and a comment that say which flow got slower and which step took the time.