DocsCypress

Cypress

Send Cypress results to TestBeaver by writing a JUnit XML report, then uploading it with the CLI.

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

npm install -D mocha-junit-reporter

# cypress.config.ts (example with mocha junit reporter)
import { defineConfig } from 'cypress';

export default defineConfig({
  reporter: 'mocha-junit-reporter',
  reporterOptions: {
    mochaFile: 'cypress/results/results-[hash].xml',
  },
  e2e: {},
});

Cypress runs one reporter per process; merge or glob multiple XML files if you use [hash] in the output path. Optional: @testbeaver:<caseId> in an it title to pin a case.

3. Submit to TestBeaver

npx cypress run
testbeaver results submit \
  --project "$TESTBEAVER_PROJECT_ID" \
  --name "Cypress" \
  --results 'cypress/results/*.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