Skip to content

feat(cli): add --add-reporter to append reporters without replacing existing config - #41993

Merged
dgozman merged 2 commits into
microsoft:mainfrom
himasree424:fix-41990
Jul 28, 2026
Merged

feat(cli): add --add-reporter to append reporters without replacing existing config#41993
dgozman merged 2 commits into
microsoft:mainfrom
himasree424:fix-41990

Conversation

@himasree424

Copy link
Copy Markdown
Contributor

Summary

Adds a --add-reporter CLI flag that appends a reporter to the ones already
configured in playwright.config, instead of replacing them like --reporter does.

  • --reporter overwrites the configured reporters; there was no supported way to
    attach an extra reporter for a single run while keeping the project's own reporters.
  • --add-reporter appends on top of whatever is configured (or on top of
    --reporter), accepting a built-in name or a path/package to a custom reporter,
    comma-separated.
  • Enables IDE integrations and CI observability tools to consume the reporter API
    without editing user configs, writing temp config files, or parsing stdout.

Behavior is unchanged when the flag is not used.

Fixes #41990

@himasree424

Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "MCP"

7808 passed, 1266 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

7 flaky ⚠️ [chromium-library] › library/video.spec.ts:664 › screencast › should capture full viewport `@frozen-time-library-chromium-linux`
⚠️ [chromium-library] › library/beforeunload.spec.ts:130 › should support dismissing the dialog multiple times `@chromium-ubuntu-22.04-arm-node20`
⚠️ [chromium-library] › library/video.spec.ts:736 › screencast › should work with video+trace `@chromium-ubuntu-22.04-arm-node20`
⚠️ [chromium-library] › library/video.spec.ts:495 › screencast › should capture static page in persistent context @smoke `@chromium-ubuntu-22.04-node24`
⚠️ [chromium-library] › library/popup.spec.ts:260 › should not throw when click closes popup `@chromium-ubuntu-22.04-node20`
⚠️ [chromium-page] › page/workers.spec.ts:191 › should attribute network activity for worker inside iframe to the iframe `@chromium-ubuntu-22.04-node20`
⚠️ [firefox-page] › page/page-event-request.spec.ts:181 › should return response body when Cross-Origin-Opener-Policy is set `@firefox-ubuntu-22.04-node20`

50738 passed, 1190 skipped


Merge workflow run.

@dgozman dgozman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR, looks great.

@dgozman
dgozman merged commit 75689d1 into microsoft:main Jul 28, 2026
49 of 50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CLI]: Add a CLI option to append a reporter without replacing configured reporters

2 participants