Playwright Integration

From a failing test to a shipped fix, automatically

Connect Playwright to OMG IQ in one config line and every CI failure becomes a deduplicated Finding with trace, video, and screenshot attached. The same Finding then drives the fix — through triage, a linked Story and PR, and a Ready for retest state on merge — so nothing closes itself. Tests catch regressions; OMG IQ carries them to a verified fix.

The failure → finding → fix → retest loop

Every Playwright run lands in OMG IQ and travels four labeled stages in this exact order. Each one is a different state of the same Finding, visible to humans and agents on the same board:

❶ Failure ❷ Finding ❸ Fix ❹ Retest

❶ Failure — the test breaks

A Playwright spec fails in CI on a real browser. The @omgqa/playwright-reporter publishes the run to the ingestion API with the failing test's name, status, duration, error message, and (optionally) a trace, video and screenshot. The same shape works from any JUnit-producing runner — Cypress, Jest, Vitest, pytest — or from plain HTTP via the generic adapter.

❷ Finding — the failure becomes a record

The ingestion layer turns each failure into a Finding and deduplicates by signature: a recurring bug bumps the same Finding's counter instead of spamming the inbox. Trace, video and screenshot upload to private storage via short-lived signed URLs and attach as evidence with a thumbnail. The Finding is now a typed, queryable, auditable record — not a chat log line.

❸ Fix — the work that closes the gap

An agent (or a human) claims the Finding, checks duplicates with find_similar_findings, files or links a Story, writes the code in an isolated worktree, runs make verify green, opens a PR, and hands it to the serialized merge lane via submit_for_merge. The PR links back to the Finding, so the fix and the bug share a thread.

❹ Retest — the same Playwright suite runs again

When the PR merges, the Finding moves to Ready for retest. The same Playwright suite that originally failed now runs against the merge commit. A human reviewer (you) compares the new trace against the original failure and closes the Finding — fixed, won't fix, accepted risk, or duplicate — with the reason captured for the record.

Nothing ships itself. Every status change is attributed and audited — agent, person, or commit — so the complete history of a Finding is durable and reviewable long after the merge.

Integration steps — setup & usage

Wiring Playwright into the QA / hardening workflow takes two passes: a one-time setup (create a project + API key, install the reporter, point it at OMG IQ), then the usage loop on every CI run (the reporter ships the run to the ingestion API and OMG IQ does the rest).

Setup — one time

  1. Create the project (or pick one). In OMG IQ, every Finding belongs to a project; the reporter targets one project per run. If you don't have a project yet, sign in and create one — the project id (UUID) and key (e.g. CHK) are what the reporter needs.
  2. Generate a project-scoped API key. Under Account → API keys, create a new key, bound to that project, with the scopes your agent needs (read + write, or read-only for a watcher). Store it as a CI secret — e.g. OMGQA_API_KEY in GitHub Actions, GitLab CI, or Azure DevOps.
  3. Install the reporter. Add @omgqa/playwright-reporter to your test project's devDependencies:
    # npm npm install --save-dev @omgqa/playwright-reporter # or pnpm / yarn / bun pnpm add -D @omgqa/playwright-reporter
    For other runners: @omgqa/cypress-reporter for Cypress, @omgqa/jest-reporter for Jest/Vitest, @omgqa/pytest-reporter for pytest. The shape of every reporter's payload is identical.
  4. Point the reporter at OMG IQ. Add it as a Playwright reporter. The reporter fails soft — a misconfigured or unreachable OMG IQ will never fail your test run — so onboarding is safe to leave on from the first commit:
    // playwright.config.ts export default defineConfig({ reporter: [ ['list'], ['@omgqa/playwright-reporter', { baseUrl: 'https://api.omgiq.com', apiKey: process.env.OMGQA_API_KEY, // create under Account → API keys projectId: '<your-project-id>', }], ], });
    No other config is required to get the failure → finding → fix → retest loop live. All other options (branch, commit, dedupe, timeoutMs, softFail) have sensible defaults.
  5. (Optional) wire ingest secrets in CI. Set OMGQA_API_KEY and OMGQA_PROJECT_ID as masked CI variables. If you want the QA / hardening workflow to also pick up coverage and JUnit XML, add OMGQA_COVERAGE with the path to a Cobertura or lcov report and OMGQA_JUNIT with the JUnit XML path.

Usage — every CI run

  1. Tests run as normal. npx playwright test / pnpm test / CI trigger — nothing changes about how Playwright itself runs.
  2. Reporter publishes the run. After the suite, the reporter POSTs the run JSON to /api/v1/ingest/playwright-mcp?projectId=…. Failures are turned into Findings, deduped by signature, and decorated with trace/video/screenshot when available.
  3. An agent (or you) picks up the Finding. Triage happens through the same MCP tools the rest of the system uses — search_findings, get_finding_details, find_similar_findings — so an agent on the team can drive the same board you see in the UI.
  4. Open a PR linked to the Finding. Either by hand (paste the CHK-… key in the PR body — OMG IQ links it on merge) or through the agent via link_pr. The PR's commit and merge event keep the Finding's history intact.
  5. On merge, the Finding moves to Ready for retest. OMG IQ moves the state when the linked PR merges; you don't have to remember. The retest Playwright run on the merge commit is what a human uses to close it.
  6. A human disposition closes the loop. Fixed → Resolved. Won't fix / accepted risk / duplicate → closed with the reason captured for the record. Nothing in the fleet crosses that gate on its own.
Don't use Playwright? The same setup works for Cypress, Jest/Vitest, pytest, Selenium, or plain GitHub Actions — POST the same normalized JSON shape to /api/v1/ingest/generic. Named adapters (playwright-mcp, momentic, mabl, qawolf) map vendor payloads onto the same Finding record with the same dedup and the same audit trail.

What attaches to a Finding

Every Playwright run ships with rich evidence that lands automatically:

Files upload directly to private storage via short-lived signed URLs — the API never proxies bytes. In the app you can open a trace or HAR right inside the Finding on one synchronized timeline.

Flakiness & root-cause signals, included

Because every Playwright run lands in OMG IQ, the platform knows what your tests actually do — not just what the latest run says.

🎯 Flaky-test detection

Tests that pass and fail without a code change are flagged as flaky and surfaced on a leaderboard. Quarantine noisy tests instead of chasing them.

🧠 Root-cause taxonomy

Each failure is auto-categorized into 7 buckets — product bug, UI timing, environment, data/parallelism, flaky, suite config, unknown — by a deterministic rules engine with an optional AI classifier. Reviewers' corrections bias future runs.

📊 Release-readiness verdict

One rollup per project: open criticals/highs, pass rate, flaky rate, coverage — resolving to a go / no-go verdict for a release.

📈 Coverage trend

Ingest coverage from CI (Cobertura, lcov, or a single percent) and watch the trend per commit and per branch.

What a fix looks like end-to-end

  1. Failure. Playwright runs npm test on the PR. Two tests fail on Safari; the reporter ships the run to OMG IQ.
  2. Finding. The ingestion layer turns each failure into a Finding (or bumps an existing one if it's a repeat) with the trace and screenshots attached.
  3. Fix. An agent claims the checkout Finding, opens a Story (CHX-87), branches feat/CHX-fix-checkout, writes the fix, runs make verify green in its isolated worktree, pushes the branch, opens a PR, and hands it to the merge lane. CHX-87 reaches Ready for Acceptance.
  4. Retest. The PR merges, the Finding moves to Ready for retest, and the same Playwright suite runs against the merge commit. Both tests pass. A reviewer (you) compares the new trace against the original failure, confirms the fix, and closes the Finding.
Same loop, every time. The Finding is the durable thread between failure and fix — visible to product, devs, QA and the agent that closed it.

OMG IQ — Governed agent fleets for verified software delivery.

Documentation · API Reference · MCP Guide · Playwright · Home

Privacy · Cookie Policy · Terms · Trust & security