Skip to content

Commit 5e606f2

Browse files
snomiaoclaude
andauthored
[bugfix] Fix E2E test report generation for non-chromium browsers (#7193)
## Summary Fixes an issue where Playwright HTML reports were not being generated for `chromium-2x`, `chromium-0.5x`, and `mobile-chrome` test runs, causing 404 errors when accessing report links in PR comments. ## Problem Only the first report link (chromium) had contents - the other three browsers returned 404 errors. Investigation revealed that artifacts for non-chromium browsers were only uploading 1 file (report.json) instead of the full HTML report with ~32 files. The root cause was that these browsers run very few tests (1-6 tests each), and when using `--reporter=html --reporter=json` together, Playwright would only generate the JSON report without the HTML assets. ## Solution Changed the workflow for non-chromium browsers to use the same approach as the sharded chromium tests: 1. Run tests with `--reporter=blob` 2. Generate HTML and JSON reports separately using `merge-reports` This ensures both HTML and JSON reports are always generated with complete assets, regardless of test count. ## Testing The fix can be verified by: 1. Checking that this PR's workflow run uploads similar file counts for all browsers 2. Confirming all 4 report links are accessible and show proper HTML content Related to #7186 🤖 Generated with [Claude Code](https://claude.com/claude-code) ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-7193-bugfix-Fix-E2E-test-report-generation-for-non-chromium-browsers-2c06d73d365081ba8ea3ed0d3f5d8d38) by [Unito](https://www.unito.io) Co-authored-by: Claude <[email protected]>
1 parent 3443c8f commit 5e606f2

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

.github/workflows/ci-tests-e2e.yaml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,19 @@ jobs:
124124
- name: Run Playwright tests (${{ matrix.browser }})
125125
id: playwright
126126
run: |
127-
# Run tests with both HTML and JSON reporters
127+
# Run tests with blob reporter first
128+
pnpm exec playwright test --project=${{ matrix.browser }} --reporter=blob
129+
env:
130+
PLAYWRIGHT_BLOB_OUTPUT_DIR: ./blob-report
131+
132+
- name: Generate HTML and JSON reports
133+
if: always()
134+
run: |
135+
# Generate HTML report from blob
136+
pnpm exec playwright merge-reports --reporter=html ./blob-report
137+
# Generate JSON report separately with explicit output path
128138
PLAYWRIGHT_JSON_OUTPUT_NAME=playwright-report/report.json \
129-
pnpm exec playwright test --project=${{ matrix.browser }} \
130-
--reporter=list \
131-
--reporter=html \
132-
--reporter=json
139+
pnpm exec playwright merge-reports --reporter=json ./blob-report
133140
134141
- name: Upload Playwright report
135142
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)