Skip to content

feat(reporter): add omitTags option to omit auto-appended tags#41968

Merged
dcrousso merged 1 commit into
microsoft:mainfrom
dcrousso:fix-41945
Jul 24, 2026
Merged

feat(reporter): add omitTags option to omit auto-appended tags#41968
dcrousso merged 1 commit into
microsoft:mainfrom
dcrousso:fix-41945

Conversation

@dcrousso

Copy link
Copy Markdown
Contributor

the terminal reporters automatically append a test's tags to its title, which clutters the output when a test declares many tags

add an off-by-default omitTags option that suppresses the appended tags in the list, line, dot, github, and junit reporters

note that tags written directly into a test title are left untouched

fixes #41945

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Comment thread docs/src/test-reporters-js.md Outdated
| `PLAYWRIGHT_FORCE_TTY` | | Whether to produce output suitable for a live terminal. Supports `true`, `1`, `false`, `0`, `[WIDTH]`, and `[WIDTH]x[HEIGHT]`. `[WIDTH]` and `[WIDTH]x[HEIGHT]` specifies the TTY dimensions. | `true` when terminal is in TTY mode, `false` otherwise.
| `FORCE_COLOR` | | Whether to produce colored output. | `true` when terminal is in TTY mode, `false` otherwise.
| `NO_COLOR` | | Whether to disable colored output ([no-color.org](https://no-color.org/)). Any non-empty value disables colors. | unset
| | `omitTags` | Whether to omit test tags that are automatically appended to test titles. | `false`

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.

Please add PLAYWRIGHT_LIST_OMIT_TAGS env variable support as well. I'd also put this line next to the first two options.

Same goes for other reporters.

the terminal reporters automatically append a test's tags to its title, which clutters the output when a test declares many tags

add off-by-default `omitTags` option and `PLAYWRIGHT_*_OMIT_TAGS` environment variables that suppresses the appended tags in the `list`, `line`, `dot`, `github`, and `junit` reporters

note that tags written directly into a test title are left untouched
@github-actions

Copy link
Copy Markdown
Contributor

Test results for "MCP"

1 failed
❌ [chrome] › mcp/annotate.spec.ts:57 › should capture multiple screenshots in one annotation @mcp-ubuntu-latest-chrome

7794 passed, 1266 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

6 flaky ⚠️ [chromium-library] › library/video.spec.ts:664 › screencast › should capture full viewport `@realtime-time-library-chromium-linux`
⚠️ [chromium-library] › library/popup.spec.ts:260 › should not throw when click closes popup `@chromium-ubuntu-22.04-node24`
⚠️ [chromium-library] › library/video.spec.ts:495 › screencast › should capture static page in persistent context @smoke `@chromium-ubuntu-22.04-node20`
⚠️ [chromium-library] › library/chromium/chromium.spec.ts:211 › should intercept service worker requests (main and within) `@chromium-ubuntu-22.04-node22`
⚠️ [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`
⚠️ [firefox-page] › page/page-goto.spec.ts:81 › should work with Cross-Origin-Opener-Policy `@firefox-ubuntu-22.04-node20`

50641 passed, 1190 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

🟢 CI is clear — the one failure is a pre-existing flake

Hi, I'm the Playwright bot and I took a look at the failing CI.

The single hard failure — mcp/annotate.spec.ts:57 on mcp-ubuntu-latest-chrome — is a known flake, not something this PR caused. This PR only touches reporter code (base.ts, dot.ts, github.ts, junit.ts, line.ts, list.ts, the omitTags type), which the MCP annotation-capture flow doesn't exercise.

Details

This PR adds an off-by-default omitTags reporter option. The diff is confined to packages/playwright/src/reporters/*, the generated types, docs, and tests/playwright-test/reporter-base.spec.ts. Nothing in it reaches the MCP server or browser automation.

Pre-existing flake / infra

  • [chrome] › mcp/annotate.spec.ts:57 › should capture multiple screenshots in one annotation — flake. In the aggregated CI results this test fails 18 of 468 runs (≈3.8%) on mcp-ubuntu-latest-chrome, and it flakes across many other MCP bots (windows-chrome, ubuntu-webkit, ubuntu-firefox, macos-chrome/chromium/webkit, windows-firefox/msedge) too. Those failures land on SHAs this PR can't be responsible for — pushes to main (e.g. runs 29957712526, 29960743784, 30020951381) and another PR (feat(chromium): roll to r1235 #41974, run 30061238899). The signature is a timeout / Target page, context or browser has been closed, i.e. a browser-teardown timing race, not a logic break.

    Recent run history for this test on mcp-ubuntu-latest-chrome (oldest → newest, last entry is this PR's run):

    🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟥🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟥🟩

  • The six entries reported as flaky in the tests 1 job (library/video.spec.ts screencast tests, library/popup.spec.ts:260, library/chromium/chromium.spec.ts:211, page-event-request.spec.ts:181, page-goto.spec.ts:81) all passed on retry and are unrelated to reporter code — nothing to triage.

Triaged by the Playwright bot - agent run

@dcrousso
dcrousso merged commit 898655c into microsoft:main Jul 24, 2026
49 of 50 checks passed
@dcrousso
dcrousso deleted the fix-41945 branch July 24, 2026 16:27
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.

[Feature]: Make tags auto-appending configurable

2 participants