@qanalyzer/forge-playwright
v1.2.1
Published
QAnalyzer Playwright reporter — ingest or file modes via @qanalyzer/forge-commons
Maintainers
Readme
@qanalyzer/forge-playwright
Playwright reporter for QAnalyzer (Jira Forge quality hub).
Install
npm install -D @qanalyzer/forge-playwright @qanalyzer/forge-commons @playwright/testPeer: @playwright/test ≥1.40.
Configure
// playwright.config.js
const { defineConfig } = require('@playwright/test');
module.exports = defineConfig({
testDir: './test',
reporter: [
['list'],
[
'@qanalyzer/forge-playwright',
{
// Defaults to mode=off (no credentials required)
// mode: 'ingest' | 'file' | 'off',
// projectKey: 'DEMO',
},
],
],
});Modes
| Mode | Behavior |
| ---- | -------- |
| off (default) | No network / file write |
| file | Writes the ingest payload (default ./qanalyzer-results.json) |
| ingest | POSTs the payload with format: jest-json |
Env (same as CLI): QANALYZER_MODE, QANALYZER_PROJECT_KEY, QANALYZER_INGEST_URL, QANALYZER_INGEST_TOKEN, QANALYZER_LAUNCH_NAME.
Helpers
const { test } = require('@playwright/test');
const { qa } = require('@qanalyzer/forge-playwright');
test('AUTH-101 login', async ({ page }) => {
qa.suite('Auth');
qa.fields({ layer: 'e2e' });
// Steps: native Playwright API only — no qa.step()
await test.step('open login', async () => {
await page.goto('/login');
});
});Prefer Jira issue keys in test titles. Native test.step() hierarchy lands on assertionResults[].meta.qa.steps.
qa.attach({ contentType }) is metadata-only for now (binary upload deferred).
Dual path
Path A — Playwright JSON + CLI:
npx playwright test --reporter=json --output=qanalyzer-playwright.json
# Convert / upload with CLI when using raw Playwright JSON, or prefer Path B file mode:
npx @qanalyzer/forge-api-client --project DEMO --report qanalyzer-results.jsonPath B — @qanalyzer/forge-playwright reporter (mode=ingest or mode=file):
QANALYZER_MODE=ingest \
QANALYZER_PROJECT_KEY=DEMO \
QANALYZER_INGEST_URL=... \
QANALYZER_INGEST_TOKEN=... \
npx playwright testmode=file writes an ingest payload (jest-json shape A) ready for Forge. Path A raw Playwright JSON is a separate dual-path option for teams that already emit Playwright's JSON reporter.
