mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
docs: note that sharding only works for parallel tests (#30272)
References #30253.
This commit is contained in:
parent
3cea258a9c
commit
adc645d3cb
@ -5,7 +5,7 @@ title: "Sharding"
|
||||
|
||||
## Introduction
|
||||
|
||||
By default, Playwright runs tests in [parallel](/test-parallel.md) and strives for optimal utilization of CPU cores on your machine. In order to achieve even greater parallelisation, you can further scale Playwright test execution by running tests on multiple machines simultaneously. We call this mode of operation "sharding".
|
||||
By default, Playwright runs test files in [parallel](./test-parallel.md) and strives for optimal utilization of CPU cores on your machine. In order to achieve even greater parallelisation, you can further scale Playwright test execution by running tests on multiple machines simultaneously. We call this mode of operation "sharding".
|
||||
|
||||
## Sharding tests between multiple machines
|
||||
|
||||
@ -20,6 +20,8 @@ npx playwright test --shard=4/4
|
||||
|
||||
Now, if you run these shards in parallel on different computers, your test suite completes four times faster.
|
||||
|
||||
Note that Playwright can only shard tests that can be run in parallel. By default, this means Playwright will shard test files. Learn about other options in the [parallelism guide](./test-parallel.md).
|
||||
|
||||
## Merging reports from multiple shards
|
||||
|
||||
In the previous example, each test shard has its own test report. If you want to have a combined report showing all the test results from all the shards, you can merge them.
|
||||
|
Loading…
x
Reference in New Issue
Block a user