Playwright by default runs all tests within a single spec file in order using the same worker, and runs tests in different spec files in parallel.
You can now use the
test.describe.parallel block to specify that all tests contained in the block are independent and can be run in parallel. This can mean faster test runs.
test.describe.serial to specify the tests contained should be run one after another, and the subsequent tests won’t be run if an earlier test fails.
test.step which can be used to break tests down further into a series of steps.
I’ve updated my example TypeScript tests to use the parallel format.