πŸ’‘ If you like this website, please share it with your friends and network! πŸš€
Back to All Questions
Question 76 of 100
Execution
Advanced

What is the role of workers in Playwright Test?

The Answer

Workers are isolated Node.js processes. Each worker handles one test at a time, running it in its own browser instance. Workers are created up to the configured maximum and reused across tests.

Deep Dive Explanation

When a worker finishes one test, it picks up the next available test from the queue. Playwright reuses workers (and their browser instances) across tests within the same project for efficiency. However, each new test gets a fresh browser CONTEXT β€” ensuring complete state isolation. The browser process itself is reused, saving the overhead of browser launch.