Run the same Playwright test suite in separate CI jobs with a different --shard=current/total value in each job. For four jobs, use --shard=1/4 through --shard=4/4. To combine their results, have each job save a Playwright blob report, collect the reports, then run npx playwright merge-reports --reporter html ./all-blob-reports.
How Playwright sharding works
Sharding divides a test run across independent CI jobs or machines. The shard index is 1-based, and every job must use the same total while receiving a different index. For example, four concurrent jobs run the same code and configuration, with shard arguments 1/4, 2/4, 3/4, and 4/4. See Playwright’s sharding documentation and command-line reference.
Shards are not extra workers inside one machine: they are separate test runs that CI must launch. Playwright workers add another layer of concurrency within each run. A practical arrangement is to start with several CI shard jobs and one worker per job, then tune the worker count based on runner capacity and suite stability.
Choose shard and worker counts
Start with stable CI settings
Playwright recommends setting workers: 1 in CI “to prioritize stability and reproducibility.” This is a starting recommendation, not a requirement or universal fastest setting. More workers can help on capable runners, but also increase CPU and memory contention and may expose tests that share mutable state. See Playwright’s CI guidance and parallelism documentation.
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
import { defineConfig } from '@playwright/test';
export default defineConfig({
workers: process.env.CI ? 1 : undefined,
reporter: process.env.CI ? 'blob' : 'html',
});
This configuration uses a blob reporter in CI so shard results can later be merged, while retaining an HTML report for a local run. Adjust the worker setting only after checking runner resources and test behavior.
Balance across files or individual tests
By default, Playwright distributes files among shards, while tests within a file run sequentially. If a few files contain most of the suite’s work, shards may finish at noticeably different times. Setting fullyParallel: true allows distribution at individual-test granularity and can improve balance when tests are safe to run independently. Static skips and fixmes are not counted in shard balancing, according to the sharding guide.
import { defineConfig } from '@playwright/test';
export default defineConfig({
fullyParallel: true,
});
Do not enable full parallelism solely to make shards look more balanced. It requires tests to tolerate independent execution. Browser contexts isolate browser state, but do not isolate external backend data: tests using the same account, records, or other shared resources can still collide. Use distinct test data or another isolation strategy. Playwright discusses these behavior differences in its parallelism guide.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
Run one shard in each CI job
For four jobs, each job runs the same command with its own index:
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
npx playwright test --shard=1/4
npx playwright test --shard=2/4
npx playwright test --shard=3/4
npx playwright test --shard=4/4
In a CI matrix, map the provider’s job index to Playwright’s 1-based index. Ensure all jobs use the same shard total and test code, and that no two jobs receive the same index. The provider’s matrix syntax and variable names differ; Playwright’s CI guide includes examples for GitHub Actions, CircleCI, and GitLab CI.
GitHub Actions matrix example
This illustrative workflow runs four shard jobs, uploads each job’s blob report under a distinct artifact name, and merges the artifacts in a separate job. Adapt the checkout, Node version, dependency installation, and browser installation to your project.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
name: Playwright tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
shard: [1, 2, 3, 4]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- run: npx playwright install --with-deps
- run: npx playwright test --shard=${{ matrix.shard }}/4
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: blob-report-${{ matrix.shard }}
path: blob-report
retention-days: 7
merge-reports:
if: ${{ !cancelled() }}
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- uses: actions/download-artifact@v4
with:
path: all-blob-reports
pattern: blob-report-*
merge-multiple: true
- run: npx playwright merge-reports --reporter html ./all-blob-reports
- uses: actions/upload-artifact@v4
with:
name: playwright-report
path: playwright-report
retention-days: 7
The upload step is conditioned so it can preserve a report when tests fail, where the runner permits; cancellation can still prevent artifact collection. Distinct artifact names avoid shards overwriting one another. A merge job should gather every available shard artifact before merging. Consult the current Playwright CI examples for provider-specific details.
Merge shard results into one HTML report
Set the CI reporter to blob. Each shard then writes an archive with run details and attachments. Upload or otherwise preserve each archive, download all shard outputs into one directory, and run:
Free tools Windows power users keep installed
One-click scans. No signup required.
npx playwright merge-reports --reporter html ./all-blob-reports
The merged HTML report is written to playwright-report by default. Playwright’s reporter documentation explains the blob reporter and merging workflow. If merging runs from different environments rather than shards, label those environments as described in the merge guidance so their results remain distinguishable.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Improve speed without sacrificing reliability
- Measure shard completion times. More shards do not guarantee proportionally shorter runs. Suite distribution, job startup, runner capacity, and test behavior affect elapsed time; official documentation establishes no universal ideal shard count or speedup.
- Address uneven shards. Large files can skew file-level distribution. Consider
fullyParallel: trueonly after confirming independent test behavior. - Increase workers cautiously. First understand CPU and memory available to each runner. Raising worker counts can increase contention and reveal shared-state problems.
- Keep test data independent. Separate browser contexts do not prevent concurrent tests from modifying the same backend account or record.
- Avoid unnecessary browser installs. Install only browser engines your suite uses where appropriate; Playwright’s best-practices guide recommends limiting browser downloads to those needed.
- Retain reports after failures. Configure artifact upload to run despite test failure when your CI provider allows it, and use unique artifact names for every shard.
Troubleshoot common sharding problems
A shard reports no tests or the suite appears incomplete
Check that every job uses the same total, each index is between 1 and that total, and all indices are represented exactly once. Confirm that every job checks out the same test revision and uses compatible configuration and dependencies.
One shard takes much longer than the others
With default file-level distribution, a small number of long files can make work uneven. Inspect the suite’s file sizes and durations, then evaluate fullyParallel: true if test isolation permits it. Raising worker counts may help only when runner resources are sufficient and the tests remain reliable.
Tests fail only when run in parallel
Look for shared external state such as common accounts, records, or resources modified by concurrent tests. Assign unique data per test or shard, or serialize the tests that cannot safely overlap. Browser context isolation alone does not protect a shared backend.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitchesBest Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
The merged report is missing shard results
Verify that every shard’s blob report artifact was uploaded, that artifact names are unique, and that the merge job downloads all artifacts into the directory passed to merge-reports. Also check that the upload step runs after a failed test command where the CI provider supports that behavior.
The merge command cannot find reports
Check the downloaded directory path and confirm it contains the blob report files rather than only nested artifact folders or unrelated files. Make the merge command’s input directory match the actual download layout.
Or skip the browser setup
ScreenshotNeo is a website screenshot API and MCP server for developers; it is separate from Playwright Test and does not shard or run Playwright test suites. For capturing a page image or PDF without configuring a browser locally, make one API request. See the ScreenshotNeo API documentation.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
ScreenshotNeo accepts cookie or consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers indicate the page verdict and billing status. Its MCP server offers take_screenshot, get_page_info, and capture_pdf for AI agents. The free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000.
Sign up for ScreenshotNeo’s free plan to get 1,000 screenshots a month with no card.
Frequently Asked Questions
Can I run Playwright sharding locally?
The shard option divides a test run, but the wall-clock benefit discussed here comes from launching separate shard runs concurrently; a single sequential command does not create concurrent CI machines.
Does Playwright guarantee equal test counts or equal durations per shard?
No equal-duration guarantee is established. File sizes, test durations, and skipped or fixed tests affect how balanced the work is.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →

