From TesterArmy
Turn TesterArmy saved tests into e2e tests that run in your repository and CI.
A TesterArmy saved test is a list of plain-language steps that a QA agent
runs in TesterArmy’s cloud. In e2e, each step becomes a line in a TypeScript
test that runs on your machine or in your CI: an agent.act or
agent.assert call, or a locator call when the step needs no judgment. A
coding agent reads your projects and tests through the TesterArmy MCP server
and writes the e2e tests.
For a migration that spans several sessions, the migrate-to-e2e skill records what moved in a progress file and keeps the TesterArmy tests until you retire each one.
Connect the TesterArmy MCP server
The coding agent reads your tests from the hosted server at
https://tester.army/mcp. Add it to the coding agents on your machine:
npx add-mcp --global --name testerarmy https://tester.army/mcppnpm dlx add-mcp --global --name testerarmy https://tester.army/mcpbunx add-mcp --global --name testerarmy https://tester.army/mcpadd-mcp writes Claude Code’s entry to ~/.claude.json. If you set
CLAUDE_CONFIG_DIR, run
claude mcp add --transport http testerarmy https://tester.army/mcp instead.
Sign in when the client asks. Other ways to add the server are in
TesterArmy’s MCP setup.
The migration only reads from TesterArmy. It never edits, deletes, or runs your tests there.
Port the project
Rewrite one test
Each step becomes one awaited call. A login step becomes a setup test that
signs in one time and saves a session:
{
"title": "Creates a project",
"steps": [
{ "type": "login", "title": "Log in as the admin" },
{ "type": "act", "title": "Open Projects from the sidebar and click New Project" },
{ "type": "act", "title": "Name the project Apollo and save" },
{ "type": "assert", "title": "Apollo appears in the project list" }
]
}import { test } from '@e2e-dev/web';
import { expect } from 'e2e';
test('creates a project', { session: 'admin' }, async ({ app, agent, screen }) => {
await app.open('/');
await agent.act('open Projects from the sidebar and click New Project');
await agent.act('name the project {name} and save', { params: { name: 'Apollo' } });
await agent.assert('Apollo appears in the project list');
await expect(screen.getByText('Apollo')).toBeVisible();
});import { test } from '@e2e-dev/web';
import { credentials } from 'e2e';
test.setup('log in as the admin', { sessions: ['admin'] }, async ({ app, agent, session }) => {
const admin = credentials.user('admin');
await app.open('/login');
await agent.act('log in', { params: { username: admin.username, password: admin.password } });
await agent.assert('the dashboard is shown');
await session.save('admin');
});TesterArmy opens the project URL before the first step. In e2e, nothing
opens on its own, so each test starts with app.open().
Map each step
Keep the agent for a step that reads the screen to decide, spans several screens, or names no stable control. Before you swap a step for a locator, find the control’s exact name, and check the same end state.
What differs on purpose
- Tests run on your machine or in your CI, not in TesterArmy’s cloud. You choose the app URL and the device.
- The model never sees a password. The runner types it from a handle, see Authentication.
- An
agent.actstep replays its recorded actions without a model call. When the screen no longer matches, the agent takes over, see Replay cache.
