You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While it's a bit niche, worth mentioning how Microsoft's other tool, Playwright (the E2E test runner w/ browser automation) handles the challenge of merging reports from multiple parallel tests.
#11900
Closed
jdisco86 opened this issue
Mar 31, 2025
· 2 comments
While it's a bit niche, worth mentioning how Microsoft's other tool, Playwright (the E2E test runner w/ browser automation) handles the challenge of merging reports from multiple parallel tests.
Since they have native support for sharding (scaling parallel test execution by running tests on multiple machines simultaneously), they've shared a GH Actions example which leverages actions/upload-artifact and actions/download-artifact as follows:
jobs:
run-tests:
runs-on: ubuntu-lateststrategy:
fail-fast: falsematrix:
shardIndex: [1, 2, 3, 4]shardTotal: [4]steps:
- name: Run Playwright testsrun: npx playwright test --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}
- name: Upload blob report to GitHub Actions Artifactsif: always()uses: actions/upload-artifact@v4with:
name: blob-report-${{ matrix.shardIndex }}path: blob-reportretention-days: 1merge-reports:
# Merge reports after run-tests, even if some shards have failedif: always()needs: [run-tests]runs-on: ubuntu-lateststeps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4with:
node-version: 18
- name: Install dependenciesrun: npm ci
- name: Download blob reports from GitHub Actions Artifactsuses: actions/download-artifact@v4with:
path: all-blob-reportspattern: blob-report-*merge-multiple: true
- name: Merge into HTML Reportrun: npx playwright merge-reports --reporter html ./all-blob-reports
- name: Upload HTML reportuses: actions/upload-artifact@v4with:
name: html-report--attempt-${{ github.run_attempt }}path: playwright-reportretention-days: 14
While the added HTML-report related steps are specific for Playwright's use-case, the merge-multiple: true line is the crux here for pulling together the partial blob reports together, as required.
It's not exactly straightforward by a long-shot, but it is an "officially" recommended method for merging outputs together cohesively from prior jobs running matrix strategy.
Hi @jdisco86 - This issue does not seem to be related to the runner image. Rather looks more to be a playwright issue. Could you please elaborate on the error mesage?
Since they have native support for sharding (scaling parallel test execution by running tests on multiple machines simultaneously), they've shared a GH Actions example which leverages
actions/upload-artifact
andactions/download-artifact
as follows:While the added HTML-report related steps are specific for Playwright's use-case, the
merge-multiple: true
line is the crux here for pulling together the partial blob reports together, as required.It's not exactly straightforward by a long-shot, but it is an "officially" recommended method for merging outputs together cohesively from prior jobs running matrix strategy.
Originally posted by @rdhar in actions/runner#2477 (comment)
The text was updated successfully, but these errors were encountered: