Quickstart
You already have a Playwright suite. This page gets your test results flowing into a Brittle hub in about two minutes.
Prerequisites
Section titled “Prerequisites”- A Playwright suite (
@playwright/testalready in your project). - A Brittle hub. Either:
- The hosted demo at brittle.dev for a quick look, or
- A self-hosted hub (see Self-host overview).
- A project token. Mint one in the dashboard under Project → Settings → Tokens, type service.
Install the reporter
Section titled “Install the reporter”pnpm add -D @brittlehq/playwright-reporterAdd it to playwright.config.ts
Section titled “Add it to playwright.config.ts”import { defineConfig } from '@playwright/test';
export default defineConfig({ testDir: './tests',
reporter: [ ['list'], ['@brittlehq/playwright-reporter', { hubUrl: process.env.BRITTLE_HUB_URL, token: process.env.BRITTLE_TOKEN, }], ],
projects: [ { name: 'chromium' }, { name: 'firefox' }, { name: 'webkit' }, ],});The reporter sits next to whatever reporters you already use. It runs in
parallel with list / html / anything else.
Run your tests
Section titled “Run your tests”export BRITTLE_HUB_URL=https://brittle.devexport BRITTLE_TOKEN=brt_svc_xxxpnpm exec playwright testThe reporter forwards every result, attachment, and Playwright trace to your hub. Open the dashboard while the run is in flight and you will see sessions roll in.
What ships with each session
Section titled “What ships with each session”- The test result (pass, fail, skip).
- Playwright’s video, HAR, and trace if you have them enabled in
playwright.config.ts. test.info().annotations(owner, severity, issue links, anything you push) appear on the Session Detail page’s Annotations tab.- The git commit SHA, branch, and tags from the local checkout, picked up automatically.
Next steps
Section titled “Next steps”- Reporter configuration — every option the reporter accepts.
- Self-host overview — run your own hub.