CLI
Submit automation results from any CI with @testbeaver/cli. Point it at a JUnit XML report, or call the same endpoints as the API. Agents can still manage cases and ad-hoc results via MCP.
1. Install
npm install -D @testbeaver/cli
2. Auth
Set TESTBEAVER_API_TOKEN (cr_… from Account). Optionally set TESTBEAVER_PROJECT_ID so you can omit --project.
export TESTBEAVER_API_TOKEN=cr_… export TESTBEAVER_PROJECT_ID=…
3. Emit JUnit XML
Configure your runner, then see the framework guides for copy-paste setup:
4. Submit results
# after your tests write results.xml testbeaver results submit \ --project "$TESTBEAVER_PROJECT_ID" \ --name "CI smoke" \ --env staging \ --results results.xml
The CLI parses the report, matches or creates cases, starts a run, records pass/fail/untested, and closes the run. Use --no-create to only update existing cases, or --no-close to leave the run open.
How cases are matched
- If the test name (or a JUnit property) contains
@testbeaver:<caseId>, that case is used. - Otherwise the CLI uses an automation key
classname.name, stored as tagauto:…on the case. - If no case exists for that key, one is created (unless
--no-create).
Commands
testbeaver results submit --project … --results <file|glob>— recommended CI pathtestbeaver projects listtestbeaver cases list --project <id>testbeaver runs start|close|summarytestbeaver results record|list— fine-grained updates without JUnit
Successful commands print JSON on stdout.
API
Prefer raw HTTP? See the API docs.