Skip to main content

Advanced

Live runs

Watch a Playwright run as it happens. With live enabled, the reporter prints an unguessable watch link to your CI logs at run start and streams per-test progress to a hosted dashboard; all shards of one run converge on a single live view. The PDF is still generated at the end of the run, unchanged.

How it works

  1. At run start the reporter derives a stable run id (shared across all shards) and establishes an unguessable watch link with the server.
  2. The link is printed prominently to the CI logs at run start, boxed under a Live Tracker heading so it's easy to grab. If you've configured Slack/Teams/Discord notifications with on: 'always', the link is also posted to those channels when the run starts (channels set to failure / success are skipped, since the outcome isn't known yet).
  3. As tests run, batched per-test (and optionally per-step / console) updates are streamed to the server roughly every 2 seconds. The watch page groups tests by spec file and describe block into collapsible suites, failures first. A running test shows its steps settle live beneath its row, with the one it's currently executing on top.
  4. When a test finishes, its row expands into the full step tree: your test.step names with the Playwright calls and assertions nested beneath them, every branch expandable. On failure, the complete error message, code frame, and stack trace are attached to the exact step that failed, and the whole failing path is highlighted.
  5. Anyone with the link opens the dashboard and polls for live aggregate counts, a per-test stream, and a per-shard breakdown; no login required. Opening the link before the first tests report shows a “waiting for the run to start” state until data arrives.
  6. When the run exits, the stream is drained and the PDF is written exactly as before.

Live streaming is best-effort: if the server is unreachable, the run is unaffected and the PDF is still produced. It is also entitlement-gated: an active subscription with the live feature is required.

Enable live runs

Add the live option to your existing reporter config. No other changes are needed; your RF_LICENSE_KEY is reused.

// playwright.config.tsreporter: [['@reportforge/playwright-pdf', {  outputFile: 'reports/{date}-{branch}-{status}.pdf',  template: 'detailed',  live: {    enabled: true,    steps: 'failed',   // 'none' | 'failed' | 'intent' | 'all'  },}]]

Watch the run start logs for the boxed Live Tracker link, or open the run from your dashboard under Live runs (each row opens the watch page in a new tab). Chat channels configured with on: 'always' also receive the link at run start.

Python and .NET stream too. Enable live in pyproject.toml ([tool.reportforge.live] enabled = true) or the .NET options file ("live": { "enabled": true }) and the run prints the same watch link and streams to the same page. pytest rows appear as tests start and finish; the .NET test platform reports results only on completion, so rows appear as each test finishes. The live step trail and console streaming are Node.js-only.

Options

  • enabled: turn live streaming on. Default false.
  • steps: verbosity of the live trail while a test is still running, one of none (skip steps), failed (author intent + assertions + any failing step), intent (only your test.step names plus any failing step; the cleanest human-readable trail, reads like your spec), all (every test step and action). Steps are ordered so a parent test.step reads before the actions nested inside it. Playwright's own hook/fixture/teardown steps are always excluded so the per-test detail stays meaningful, but a failure that happens inside setup/teardown is still surfaced. The full step tree a finished test expands into is always sent, whatever the mode. Default failed.
  • console: stream test stdout/stderr tails. Off by default. See the security note below.
  • flushMs: batch debounce in milliseconds (500–10000). Default 2000.
  • runId: override the auto-derived run id. All shards of one run must share it.
  • serverUrl: override the streaming server base URL. Defaults to your license server.

Sharded runs

Sharded runs need no extra configuration. The run id is derived from the run-shared CI identifier (e.g. GITHUB_RUN_ID), which is identical across every matrix shard, so all shards stream into one aggregated view automatically.

# Both shards converge on one live view; no shared config.npx playwright test --shard=1/4npx playwright test --shard=2/4# Override the run id explicitly if your CI is not auto-detected:RF_LIVE_RUN_ID=my-pipeline-42 npx playwright test --shard=1/4

Aggregate counts are summed across shards at read time, so retries and out-of-order delivery never corrupt the totals.

Security & privacy

The watch link carries an unguessable access token; the run id alone is not enough to read a run. The token opens the watch page for anyone you share it with (no ReportForge account or login needed) and it is scoped to that one run: it can't read any other run, and rotating your license key never breaks an already-shared link. The stream carries test titles, statuses, step titles, and, for failed tests, the error message, code frame, and stack trace shown on the watch page. Your redact rules apply to all of it, error text included.

Leaving console: false is recommended. Enabling it streams your tests' stdout/stderr to anyone holding the link. If your tests print secrets, tokens, or PII to the console, those would be visible on the watch page. Only enable console when you trust everyone with the link.