Member-only story
Merge multiple Playwright sharding reports into one
Playwright supports running parallel tests out of the box in a single machine. Moreover, Playwright also supports running tests parallelly in multiple machines at once using sharding. However, having multiple isolated reports is not really helpful. In this article, let’s see how you can merge multiple Playwright sharding reports into one.
3 min readApr 1, 2025
Let’s say you have 4 test files which are trying to test a simple note app.
To run the Playwright tests quickly, you can divide your tests into 4 shards like below.
npx playwright test --shard=1/4
npx playwright test --shard=2/4
npx playwright test --shard=3/4
npx playwright test --shard=4/4
To run the tests using GitHub Actions then merge the test reports into a single HTML report, you need to define a playwright.yml
file for configuration as below.
name: Playwright Tests
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
jobs:
playwright-tests:
timeout-minutes: 60
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix…