run_tests
Run e2e tests in the project’s own CLI process and return each test, failure code frames, and summary; narrow runs by files, tags, grep, targets, or changed files.
Instructions
Run tests as npx e2e run does and return what it printed: each test, the failures with their code frames, and the summary. Without files it runs every test the config discovers; files narrows to a test file, a directory, a glob, or one test (tests/checkout.e2e.ts:12). The run is the CLI's own, in its own process, with its workers, retries, replay cache, and report (.e2e/report.json by default); it needs no open session and leaves open sessions alone. One run at a time; cancelling the call interrupts it as Ctrl-C would. To fix a failing test, open_session {test: ":"} stops on the screen where it failed.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "run_tests"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tag | No | Only tests carrying any of these tags | |
| grep | No | Only tests whose title (describe titles and test title, space-joined) matches this regular expression | |
| files | No | What e2e run takes as positionals: files, directories, quoted globs, or file:line for the test declared on that line (tests/checkout.e2e.ts:12). Default: every test the config discovers | |
| config | No | Path to an e2e config file, absolute or relative to the server's working directory; default: the server's --config, else the nearest e2e.config.ts | |
| headed | No | Show the browser or simulator while tests run, when the engine supports it; default: headless, unless the server was started with --headed | |
| target | No | Target names to run on; default: the server's --target, else every target | |
| noCache | No | Run with the replay cache off, so every agent step calls the model | |
| retries | No | Retries per failing test; default: from the config. 0 while fixing a test | |
| workers | No | Parallel workers; default: from the config | |
| excludeTag | No | Leave out tests carrying any of these tags | |
| grepInvert | No | Leave out tests whose title matches this regular expression | |
| lastFailed | No | Only the tests the previous run did not pass | |
| repeatEach | No | Run every selected test this many times, to measure a flaky one | |
| maxFailures | No | Stop the run once this many tests have failed | |
| changedSince | No | Run the configured test filters on what differs from this git ref, such as origin/main | |
| actionTimeout | No | Milliseconds each engine operation may take, such as a locator waiting for its element; 5000 while fixing a test | |
| updateSnapshots | No | Write the stored screenshots toHaveScreenshot finds missing or different, and pass |