Skip to content

Reporter configuration

The reporter is configured inline in playwright.config.ts. Most setups only need hubUrl and token; the rest are escape hatches for CI shape and metadata you want to attach to a run.

OptionTypeDescription
hubUrlstringURL of your Brittle hub. e.g. https://brittle.dev.
tokenstringProject service token. Mint under Settings → Tokens.

Both can be passed inline or via env (BRITTLE_HUB_URL, BRITTLE_TOKEN). Env wins, which is what you want from CI.

OptionTypeDefaultDescription
runNamestringtimestampDisplay name on the Runs page.
tagsarray[]Run-level tags. Comma-separated env: BRITTLE_RUN_TAGS=nightly,wiki.
runMetadataobject{}Free-form key/value pairs attached to the run. Branch, commit, PR url, etc.
detectGitbooleantrueAuto-detect git context from the local repo. Disable for ephemeral CI.
['@brittlehq/playwright-reporter', {
hubUrl: process.env.BRITTLE_HUB_URL,
token: process.env.BRITTLE_TOKEN,
runName: `Wikipedia nightly · ${new Date().toISOString().slice(0, 10)}`,
tags: ['nightly', 'wikipedia'],
runMetadata: { branch: process.env.GITHUB_REF_NAME },
}],
OptionTypeDefaultDescription
silentbooleanfalseSuppress reporter warnings on stdout.
requestTimeoutMsnumber30000Per-request timeout for hub HTTP calls.
  • Creates a Session row per test on onTestBegin.
  • POSTs the test result + attachments on onTestEnd.
  • Forwards test.info().annotations to the Session Detail page.
  • Idempotent: re-running the same BRITTLE_BUILD_ID updates the existing run rather than creating a duplicate. Set BRITTLE_BUILD_ID=${{ github.run_id }} in CI for clean run-vs-rerun ergonomics.

The reporter ships test results from a Playwright suite running on your own machine or CI runner — Brittle does not launch the browser. The dashboard tags these sessions as reported. The grid runtime (where the hub launches the browser via the Node executor) ships sessions tagged managed. The dashboard renders both identically; the tag is a debugging hint, not a feature gate.