In your CI configuration, create N parallel job runners; pass --shard=1/N to the first, --shard=2/N to the second, and so on, where N is the total number of shards
Each shard runs an independent subset of test files; combine this with workers: N in playwright.config.ts to further parallelize within each shard using multiple CPU cores
Enable fullyParallel: true in playwright.config.ts so individual tests within a file can also run in parallel across workers, ensuring more even load distribution across shards
After all shards complete, merge their individual blob reports using npx playwright merge-reports --reporter html path/to/blob-reports/ to generate a unified HTML report
Store the blob report artifacts from each shard job and pass all artifact paths to merge-reports in the post-step job
Known gotchas
The shard index is 1-based (1/N through N/N), not 0-based — off-by-one errors in CI scripts cause one shard to be empty and tests to be missed
Test files are assigned to shards, not individual tests; if one file contains a very long test, that shard will run longer than others — splitting large test files helps balance shard duration
Shared setup performed in globalSetup runs on every shard independently; if it writes to a shared external resource (database, file server), use idempotent operations or shard-specific prefixes to avoid conflicts
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp