Fully Parallel Mode

Speed up your runs and optimize the use of your machine resources

Playwright supports multiple levels of concurrency:

  • a test suite can be split between different machines using sharding.

  • each machine can have multiple workers (according to CPU performance or explicit configuration).

The workers will run the tests in parallel, allowing for a speedup in execution and full utilization of a machine's resources.

However, by default, Playwright runs the tests of the same spec file serially — one after another. So, even if you have a powerful machine capable of supporting multiple workers, it can be underutilized. For example, if your machine has 4 workers and sharding assigns only one spec file, the tests will be executed one by one, and only one worker will be utilized at a time.

Enabling fullyParallel: true (see configuration details) allows running tests from the same spec file in parallel on different workers. This way, all available workers can be utilized, and the tests will be executed faster.

Note that the tests are required to be isolated and not shared in any state. Playwright will run the tests on different workers or even on different machines (a.k.a shards).

To enable running individual tests from the same spec file on different workers, set fullyParallel: true in your configuration file.

Version 1.0.0+ of the reporter is compatible with fully parallel mode and will collect the results of concurrent parallel executions from distributed shards and workers. Moreover, the reporter will display the results of each step, which is crucial for debugging failed CI executions.

Last updated