@testorim/cli package (version 0.4.0 and later) is also a JavaScript and TypeScript library: a test suite can run a Testorim test and gate on the verdict. It ships its own types, has no dependencies and needs Node 20 or newer.
TESTORIM_API_KEY. See Authentication for what a key may change.
From code
runTest starts the run and waits for the verdict (up to 10 minutes by default). Other calls:
verdict (passed, failed or needs_review; null while it runs or when cancelled), the step counts, the written report, failedSteps (each with the reason and blame: app, test, unsupported or internal), the run’s url, and links to the video, Playwright trace and final screenshot, which expire an hour after they were read. summary() leaves those links out because it often lands in CI logs.
In Playwright Test
In Vitest and Jest
Both work the same way; give the test a longer timeout as the third argument:test("checkout works", async () => { ... }, 11 * 60_000). The package is ESM, so run Jest with its ESM support (NODE_OPTIONS=--experimental-vm-modules npx jest). A CommonJS project can require("@testorim/cli") on Node 20.19 or newer and 22.12 or newer.
Errors
Every error derives fromTestorimError, and each is exported:
The client never retries a trigger by itself, because a retried trigger is a second run. If your workspace lives on another host, pass
apiUrl or set TESTORIM_API_URL. The full reference is in the package README.
Limits
- The site must be reachable from the internet: Testorim’s browsers refuse
localhostand private addresses. - Every run counts against your plan, whichever tool started it.
- The same package is the CLI and the MCP server for coding agents. Working in Python? See Python and pytest.

