@omgqa/playwright-reporter
v0.1.0
Published
Playwright reporter that turns a run into an OMGQA test run and auto-creates/dedups findings from failures (E20).
Maintainers
Readme
@omgqa/playwright-reporter
A Playwright reporter that turns a Playwright run into an OMGQA
test run, posts the results, and lets OMGQA auto-create and dedup findings from failures
(type=TestFailure, source=TestAutomation).
Built on @omgqa/reporter-sdk, so it shares the JUnit format, retry, and
fail-soft behaviour with the other OMGQA JS reporters.
Install
npm install --save-dev @omgqa/playwright-reporter @omgqa/reporter-sdkConfigure
// playwright.config.ts
import { defineConfig } from '@playwright/test';
export default defineConfig({
reporter: [
['list'],
['@omgqa/playwright-reporter', {
baseUrl: process.env.OMGQA_URL, // e.g. https://api.omgqa.com (apiUrl also accepted)
apiKey: process.env.OMGQA_API_KEY, // omg_... (Agent role: testruns:write + findings:create)
projectId: process.env.OMGQA_PROJECT_ID,
mode: 'import', // 'import' (default, single call) or 'api'
}],
],
});All of baseUrl, apiKey, projectId are required (or set OMGQA_URL / OMGQA_API_KEY /
OMGQA_PROJECT_ID); if any is missing the reporter logs a warning and disables itself. It never
fails your test run — publish errors are logged, not thrown.
Semantics
- Retries: only the final state of each test is reported. A test that fails then passes on a
retry (Playwright outcome
flaky) is reported as Passed. - Browser projects: the test name is prefixed with the Playwright project — `[chromium] checkout
pays with card
and[firefox] checkout > pays with card` are distinct results (and distinct finding dedup signatures). - Suite: the first
describeblock when there is one, else the spec file name. - Failures: the failure message + stack (including soft-assertion multi-errors) lands on the
finding; timeouts report
Test timed out.
Tests
node --test