How to Run Playwright Test in Parallel, Serial, or Default Mode



AI Summary

This video by Playwright Ambassador Stefan Judis provides a detailed explanation of different Playwright test execution modes: “fullyParallel,” “parallel,” “serial,” and “default.” Stefan explains how enabling the “fullyParallel” option speeds up test suite execution by running all tests concurrently across workers. By default, Playwright parallelizes spec files but runs tests within them sequentially. In scenarios where tests share resources (like a user account), the “serial” mode allows sequential execution of tests but stops further tests on the first failure. The “default” mode runs tests sequentially but continues executing all tests even if some fail, and allows running describe blocks in parallel with tests inside those blocks executing sequentially. The video includes terminal demonstrations showing the behavior of each mode, how failures affect test runs, and practical advice on choosing execution modes based on test dependencies and speed requirements. It concludes with a mention of Checkly for running Playwright tests in production monitoring setups.