@resyncnz/nexus-playwright-reporter
v0.2.6
Published
Playwright Test reporter that sends each run's results to Nexus for Jira.
Maintainers
Readme
Nexus reporter for Playwright
A Playwright Test reporter that sends each run's results to Nexus for Jira. At the end of the run it posts a Playwright JSON report to your project's Nexus results URL, where each test is matched to a Test Case by the Automation Key at the start of its title.
No runtime dependencies. Node 18+, Playwright 1.40+.
Install
npm install --save-dev @resyncnz/nexus-playwright-reporterAlternative: download it from nexus.resync.nz/integrations, or install it straight from the download URL:
npm install --save-dev https://nexus.resync.nz/downloads/nexus-playwright-reporter-0.2.3.tgzEither way it installs as @resyncnz/nexus-playwright-reporter, the name used in the config below.
Checksums are in SHA256SUMS.txt.
Configure
In Jira, open Project Settings → Nexus → CI, create an API key with the ingest
scope and copy the results URL. Store both as CI secrets named NEXUS_URL and
NEXUS_API_KEY.
// playwright.config.ts
import { defineConfig } from '@playwright/test';
export default defineConfig({
reporter: [
['list'],
['@resyncnz/nexus-playwright-reporter', {
project: 'NEX',
environment: 'staging',
// testSet: 'NEX-25', // record into this cycle
// failOnUploadError: true, // fail the run if Nexus cannot be reached
// enabled: !!process.env.CI, // only send from CI
}],
],
});Each option falls back to an environment variable:
| Option | Environment variable | Meaning |
|---|---|---|
| url | NEXUS_URL | Results URL (required) |
| apiKey | NEXUS_API_KEY | API key (required; keep it in the env var, not the config file) |
| project | NEXUS_PROJECT | Jira project key (required) |
| environment | NEXUS_ENVIRONMENT | Environment label. When unset, each Playwright project's name (e.g. chromium) is used |
| testSet | NEXUS_TEST_SET | Test Set (cycle) key |
| build | NEXUS_BUILD | Build id. Default: the CI system's build number |
| commit | NEXUS_COMMIT | Commit. Default: the CI system's commit SHA |
| component | NEXUS_COMPONENT | Component label, e.g. web |
| buildUrl | NEXUS_BUILD_URL | CI job page (https), shown on each run as "Open CI job". Default: the CI system's own job page |
| idempotencyKey | NEXUS_IDEMPOTENCY_KEY | Retry key, 16-128 of A-Z a-z 0-9 . _ : -. Default: a new random key per run (0.2.3) |
| failOnUploadError | | Mark the run failed when the upload fails. Default false |
| outputFile | | Also write the report that was sent to this file |
| enabled | | false turns the reporter off. Default true |
| timeoutMs | | Request timeout. Default 60000 |
Build and commit are filled automatically on GitHub Actions, GitLab, Azure Pipelines, Bitbucket Pipelines and Jenkins.
Name your tests with the Automation Key
test('NEX-12: mandatory fields show validation errors', async ({ page }) => { ... });The key must be on the test title itself, not on an enclosing describe. With retries,
Nexus records the last attempt.
What you see
[nexus] sent 3 results to project NEX at <your-site>.atlassian-dev.net (HTTP 202). See Project Settings > CI for the delivery log.Nexus answers 202 with {"status":"accepted"} only after it has processed every
result of the report (SEC27-H9, 28/09/2026: nothing is left running in the background
behind an "accepted"); the per-test outcome (matched, unmatched, skipped) is in the delivery
log on the CI page. A {"status":"partial"} answer means Nexus holds the report and what it
recorded so far and finishes the rest itself; the reporter sends it again to confirm.
The key is never printed, nor is the URL path.
By default an upload problem (missing config, wrong key, network error) prints one
[nexus] warning and leaves the test run's result alone. Set failOnUploadError: true
to fail the run instead. A run of more than 500 tests (or a report over 5 MB) is sent in parts of at most 500 results (0.2.5), one after another to the same project, test set and build, each part with its own retry key (<key>-p2of10), at least 0.7 s apart; the log shows each part and a summary at the end. A failed part does not stop the others (and failOnUploadError fails the run at the end), except after a 400, 401 or 403, which stops it.
A report that reaches Nexus's time limit part-way is sent again until Nexus has recorded
all of it (up to 8 sends); a resend never records a result twice (0.2.0, 27/09/2026). Since
0.2.3 every send of one report carries the same Idempotency-Key header, so Nexus treats a
late resend as the same delivery, never as a new run.
Develop
node --test # from this folder; uses a local fake Nexus, no networkLicence
MIT. © 2026 Resync Consulting Limited. See LICENSE.
