M00N ReportPlaywright JS/TS
Documentation/Reporters/Playwright

🎭Playwright Reporter

A Playwright reporter for M00N Report. Streams test results to the dashboard in real time, uploads screenshots, videos, and traces captured by Playwright, and tracks test.step calls and native retry attempts without any test-side instrumentation.

Features

Real-Time Streaming

Test results stream to the dashboard via WebSocket as each test completes.

Native Step Tracking

Calls to test.step() are captured automatically and streamed live.

Rich Attachments

Screenshots, videos, traces, and custom testInfo.attach() artifacts are uploaded.

Retry Tracking

Each Playwright retry attempt is recorded as a separate execution row.

Case Linking

Link autotests to manual cases via the caseId annotation, [TC-N] tokens in titles, or dashboard auto-link rules.

🎭
Built for Playwright

First-class integration with Playwright Test and the native reporter API.

Run Metadata

Launches carry tags, custom attributes, and CI/CD context for organization-wide reporting.

Parallel Execution

Safe under Playwright's worker-based parallelism - no shared mutable state.

AI Setup Prompt

A complete, self-contained prompt for integrating this reporter into an existing Playwright TypeScript project using an AI assistant. The prompt covers installation, playwright.config.ts changes, environment variables, step and retry usage, and the most common integration pitfalls.

Store API keys outside version control. Read apiKey from process.env.M00N_API_KEY and configure the secret in CI or a local .env file that is listed in .gitignore.

Configuration Reference

OptionTypeDefaultDescription
serverUrlstring-Required. M00N ingest service URL (e.g. https://m00nreport.com)
apiKeystring-Required. Project API key (identifies org and project)
enabledbooleantrueEnable or disable the reporter. Also accepts M00N_ENABLED env var.
launchstring-Custom name or title for this test run.
tagsstring[][]Tags applied to the launch and visible on the dashboard.
attributesobject{}Custom key-value metadata. Recognized CI/CD keys feed the CI context banner; all others render as badges.
debugbooleanfalseEnable verbose reporter logging. Also accepts M00N_DEBUG env var.

CI/CD Context Banner

When CI/CD-related attribute keys are passed through the attributesoption, M00N Report automatically displays them in a dedicated CI context banner at the top of the launch view. Any attributes that do not match the keys below are rendered as regular attribute badges.

Recognized CI Attribute Keys

Banner FieldAccepted Keys (case-insensitive)Example Value
Pipelinepipeline, GITHUB_WORKFLOW, CI_PIPELINE_NAME, JOB_NAMEDeploy Production
Branchbranch, git_branch, GITHUB_REF, CI_COMMIT_REF_NAME, BRANCH_NAMEmain
Commitcommit, git_commit, GITHUB_SHA, CI_COMMIT_SHA, GIT_COMMITa1b2c3d (truncated to 7 chars)
Build #build_number, GITHUB_RUN_NUMBER, CI_PIPELINE_ID, BUILD_NUMBER1234
Build URLbuild_url, GITHUB_SERVER_URL, CI_PIPELINE_URL, BUILD_URLhttps://github.com/... (clickable)
Environmentenvironment, env, DEPLOY_ENVstaging
Triggertrigger, GITHUB_EVENT_NAME, CI_PIPELINE_SOURCEpush
Tip: Any accepted key name works. For example, both branch and GITHUB_REF populate the Branch field of the CI banner. Only the first match per field is used.

Concepts

Reference documentation for each subsystem of the reporter: attachment handling, retry tracking, step tracking, configuration sources, and troubleshooting.