DocsJUnit

JUnit

JUnit already produces XML reports. Point the TestBeaver CLI at that file after your build.

1. Install the CLI

npm install -D @testbeaver/cli
export TESTBEAVER_API_TOKEN=cr_…
export TESTBEAVER_PROJECT_ID=…

Create a token under Account. Full CLI reference: CLI docs.

2. Emit JUnit XML

# Maven Surefire (default target/surefire-reports/*.xml)
mvn test

# Or Surefire with an explicit report directory
mvn -Dsurefire.reportsDirectory=target/junit-reports test

# Gradle
./gradlew test
# reports under build/test-results/test/*.xml

Use a glob when Surefire writes one file per class. Optional: put @testbeaver:<caseId> in the test method display name (JUnit 5 @DisplayName) to pin a case.

3. Submit to TestBeaver

mvn test
testbeaver results submit \
  --project "$TESTBEAVER_PROJECT_ID" \
  --name "JUnit" \
  --results 'target/surefire-reports/TEST-*.xml'

The CLI matches or creates cases from the report, starts a run, records results, and closes the run. See matching rules on the CLI page.

Other runners

Playwright · Cypress · pytest · JUnit · TestNG · Selenium · CLI