Playwright Package Reference

Install

bash
npm install -D @sentinelqa/playwright-reporter

Config

ts
import { defineConfig } from "@playwright/test";
import { withSentinel } from "@sentinelqa/playwright-reporter";

export default withSentinel(
  defineConfig({
    reporter: [
      ["line"],
      ["junit", { outputFile: "test-results/results.xml" }]
    ],
    outputDir: "test-results",
    use: {
      trace: "retain-on-failure",
      screenshot: "only-on-failure",
      video: "retain-on-failure"
    }
  }),
  {
    project: "my-app"
  }
);

Free hosted mode

  • No Sentinel token is required.
  • The reporter uploads a hosted Sentinel debugging report and prints the shareable URL.
  • Traces, screenshots, videos, logs, and other Playwright artifacts are uploaded with the run.
  • This is the default behavior for the wrapper.

Offline mode (no uploads)

If you want the full Sentinel diagnosis and deterministic grouping without any uploads, enable offline mode. In offline mode, Sentinel generates a local HTML report and skips uploads.

bash
SENTINEL_MODE=offline
  • Generates a local report at `./sentinel-report/index.html` by default.
  • Prints a local `file://` share link in the terminal output.
  • Uploads are skipped even if `SENTINEL_TOKEN` is set.
  • Telemetry is enabled by default. Set `SENTINEL_TELEMETRY_DISABLED=1` to disable it.

Optional environment variables

bash
SENTINEL_TOKEN=your_project_ingest_token
  • `SENTINEL_MODE` (`hosted` or `offline`)
  • `SENTINEL_DEBUG` (enable debug logging)
  • `SENTINEL_REQUEST_TIMEOUT_MS` (override API request timeout)
  • `SENTINEL_UPLOAD_TIMEOUT_MS` (override artifact upload timeout)
  • `SENTINEL_TELEMETRY_DISABLED=1` (disable telemetry)

How it works

  • Sentinel reads your existing Playwright reporter paths when they are already configured.
  • Sentinel only injects the JSON reporter when it is missing.
  • Your normal `npx playwright test` command stays unchanged.
  • The hosted upload runs automatically after Playwright finishes.
  • If `SENTINEL_TOKEN` is set, the upload goes to your Sentinel workspace instead of the free hosted public flow.

Behavior matrix

  • `SENTINEL_MODE=offline`: local report only, no uploads.
  • No `SENTINEL_TOKEN`: hosted public Sentinel report.
  • `SENTINEL_TOKEN` set: upload to your Sentinel workspace.
  • Explicit Playwright `html` reporter in user config: Playwright can still keep its own HTML output if you want it for local inspection.

Upgrade path

  • Free hosted report: no account required.
  • Free workspace: 200 runs included.
  • Workspace: paid upgrade for private history, recurring issue tracking, and team access.