As your application grows, so does your test suite. What started as a nimble set of 50 tests can balloon to 500, 1,000, or even several thousand end-to-end scenarios. Running them all sequentially becomes a bottleneck, a single pipeline can eat up 30, 45, even 60 minutes of CI time. Your developers sit idle. Feedback loops stretch. Velocity suffers.
Playwright’s built-in sharding feature solves this elegantly. Instead of running all tests on a single machine, you split, or shard, your suite across multiple parallel workers, each running an independent slice. The result: dramatically faster pipelines with no extra code and minimal configuration.
This post dives deep into how sharding works, how to configure it, how to merge reports from multiple shards, and real-world tips for getting the most out of it in CI/CD environments.
What exactly is sharding?
Sharding is the concept of dividing a dataset, in this case, your test suite, into multiple equal (or near-equal) partitions called shards. Each shard contains a subset of tests and is executed independently, typically on a separate machine or container running in parallel.
Playwright implements sharding at the CLI level using two parameters: –shard=<index>/<total>. The total represents how many shards to split the suite into, and index (1-based) identifies which shard the current runner should execute.
Think of it like a deck of cards. Sharding deals the cards equally across N players, each player plays their hand independently, and together they finish the whole deck in a fraction of the time.
Playwright distributes test files across shards by alphabetical order of file path. Each shard picks up roughly total_files / N test files, ensuring balanced coverage without duplication.
How shards split your tests
| Shard 1/4 | Shard 2/4 | Shard 3/4 | Shard 4/4 |
|---|---|---|---|
| auth.spec.ts, cart.spec.ts | checkout.spec.ts, dashboard.spec.ts | login.spec.ts, orders.spec.ts | products.spec.ts, search.spec.ts |
The basic syntax
Running a specific shard is a single flag appended to your Playwright command. No plugins, no extra packages, it works out of the box.
# Run shard 1 of 3
npx playwright test --shard=1/3
# Run shard 2 of 3
npx playwright test --shard=2/3
# Run shard 3 of 3
npx playwright test --shard=3/3
Setting up sharding in GitHub Actions
GitHub Actions makes parallel sharding seamless via the strategy.matrix feature. The matrix spins up N independent runner jobs, each receiving its shard index as an environment variable.
strategy:
fail-fast: false
matrix:
shard: [1, 2, 3, 4]
- name: Run Playwright tests
run: npx playwright test --shard=${{ matrix.shard }}/4
Notice fail-fast: false this ensures that if one shard fails, the others continue running. This gives you a complete picture of all failures rather than cutting short on the first broken shard.
PakarPBN
A Private Blog Network (PBN) is a collection of websites that are controlled by a single individual or organization and used primarily to build backlinks to a “money site” in order to influence its ranking in search engines such as Google. The core idea behind a PBN is based on the importance of backlinks in Google’s ranking algorithm. Since Google views backlinks as signals of authority and trust, some website owners attempt to artificially create these signals through a controlled network of sites.
In a typical PBN setup, the owner acquires expired or aged domains that already have existing authority, backlinks, and history. These domains are rebuilt with new content and hosted separately, often using different IP addresses, hosting providers, themes, and ownership details to make them appear unrelated. Within the content published on these sites, links are strategically placed that point to the main website the owner wants to rank higher. By doing this, the owner attempts to pass link equity (also known as “link juice”) from the PBN sites to the target website.
The purpose of a PBN is to give the impression that the target website is naturally earning links from multiple independent sources. If done effectively, this can temporarily improve keyword rankings, increase organic visibility, and drive more traffic from search results.
