playwright-zephyr-junit-reporter
v1.0.0
Published
Playwright reporter that imports JUnit test results to Zephyr Squad (Zephyr for Jira Cloud) via the Test Automation API
Maintainers
Readme
playwright-zephyr-junit-reporter
A Playwright reporter that imports JUnit test results into Zephyr Squad for Jira Cloud via the Test Automation API.
Installation
npm install --save-dev playwright-zephyr-junit-reporterUsage
Add both the built-in junit reporter and this reporter to your playwright.config.js. Both must point to the same output file — this reporter reads the file that junit writes.
// playwright.config.js
export default {
reporter: [
['junit', { stripANSIControlSequences: true, outputFile: './playwright-report/junit/results.xml' }],
['playwright-zephyr-junit-reporter', {
projectKey: process.env.ZEPHYR_PROJECT_KEY,
accountId: process.env.ZEPHYR_ACCOUNT_ID,
accessKey: process.env.ZEPHYR_ACCESS_KEY,
secretKey: process.env.ZEPHYR_SECRET_KEY,
jUnitFile: './playwright-report/junit/results.xml',
}],
],
};Configuration
| Option | Type | Required | Default | Description |
|---|---|---|---|---|
| projectKey | string | yes | — | Jira project key (e.g. PROJ) |
| accountId | string | yes | — | Jira account ID of the user running the import |
| accessKey | string | yes | — | Zephyr Squad access key |
| secretKey | string | yes | — | Zephyr Squad secret key |
| jUnitFile | string | yes | — | Path to the JUnit XML results file |
| jobName | string | no | "Import tests results" | Display name for the automation job |
| jobDescription | string | no | "Import automatic tests results from JUnit file." | Description for the automation job |
| cycleName | string | no | "Playwright tests" | Test cycle name in Zephyr (current date/time is appended automatically) |
| versionName | string | no | "Unscheduled" | Zephyr version/fix version name |
| timeOut | number | no | 300000 | Upload job timeout in milliseconds |
Obtaining credentials
accessKey/secretKey: Generated in Jira under Apps → Zephyr Squad → API Keys.accountId: Your Atlassian account ID, visible in your Jira profile URL or via the Jira REST API.
License
MIT
