How do you set up number of workers in Playwright for optimal test execution? or What's the best way

18 Replies, 1120 Views

Hey! So I usually set up number of workers in playwright based on my machine's cores minus one. Like, if I've got 8 cores, I’ll do 7 workers.

But honestly, it *does* depend on your tests. If they’re heavy on I/O (like waiting for APIs), you can go higher. For CPU-heavy stuff, keep it lower.

I’ve also used `playwright.config.js` to tweak workers per project. Helps a ton if you’ve got mixed test types.

Check out Playwright’s docs on sharding too—might be useful!

Messages In This Thread



Users browsing this thread: 1 Guest(s)