Skip to content

Configuration

The Nijam Playwright reporter is configured inline in playwright.config.ts. Only apiKey and projectId are required; everything else has a sensible default.

playwright.config.ts
reporter: [
['@nijam/pw-reporter', {
apiKey: process.env.NIJAM_API_KEY,
projectId: 'b4fdfc06-76a2-4721-89eb-9d070add8a5a',
}],
],
playwright.config.ts
reporter: [
['@nijam/pw-reporter', {
apiKey: process.env.NIJAM_API_KEY,
projectId: 'b4fdfc06-76a2-4721-89eb-9d070add8a5a',
apiUrl: process.env.NIJAM_API_URL, // default: https://api.nijam.dev
environment: process.env.DEPLOY_ENV, // free-form tag, e.g. "staging"
uploadSource: true, // upload spec source for inline rendering
autoComplete: true, // finalize the run when the suite ends
silent: false, // suppress [nijam] log lines
}],
],
OptionRequiredDefaultDescription
apiKeyyes-API key from the Nijam dashboard. Store it as a CI secret.
projectIdyes-The project’s ID (UUID) from the dashboard.
apiUrlnohttps://api.nijam.devAPI base URL. Also settable via NIJAM_API_URL. You don’t normally need to set this.
environmentno-Free-form deploy tag (e.g. "staging"). Adds a run filter. Runs without it show as Unset.
uploadSourcenotrueUpload spec source so the dashboard renders tests inline. Set false to opt out.
autoCompletenotrueFinalize the run when the suite ends. Set false (or NIJAM_AUTO_COMPLETE=false) for fan-out CI.
silentnofalseSuppress all [nijam] log lines.

For environment, see Environments. For uploadSource and trace behavior, see Source & traces. For autoComplete, see CI integration.

  • projectId - open your project in the dashboard and copy its Project ID.
  • apiKey - generate one in the project’s settings and set it as NIJAM_API_KEY in your CI secrets.

The reporter is built to never break your CI. If the API is unreachable, the key is wrong, or anything else goes sideways, it logs a [nijam] warning and lets the run finish exactly as it would without Nijam. Set silent: true to suppress even those warnings.

You don’t configure commit/branch/PR/author - the reporter auto-detects them from your CI provider’s environment variables, falling back to git.

@nijam/pw-reporter also ships a nijam-pw CLI. nijam-pw fetch-failed asks Nijam which tests failed in the previous run so a retry runs only those, and clubs the attempts into one run on the dashboard:

Terminal window
npx nijam-pw fetch-failed --output failed.txt --export-env "$GITHUB_ENV"
npx playwright test $(cat failed.txt)

It reuses your NIJAM_API_KEY and NIJAM_PROJECT_ID. See Re-run only failed tests for the full per-provider CI recipe.