← Back to Discord Forum

The fullyParallel: false and test.describe.configure({ mode: 'serial' }) don't run test cases serial

I have set the config fullyParallel: false in the playwright.config.js, and test.describe.configure({ mode: 'serial' }) in each spec.js. But when run test cases via cli, they are are running on parallel with multiple workers. Is it a bug of Playwright or some thing wrong in my test environment?

Thanks for any help!

This thread is trying to answer question "Why are test cases running in parallel with multiple workers even when the config is set to fullyParallel: false and workers: 1?"

6 replies

tests inside spec file or describe block will run in serial, but multiple spec files will run in parallel if you're using more than one worker

Thanks @skorp32. I want multiple spec files still to run in serial. I have set workers: 1 in the playwright.config.js, but it did not work. Any way to run test in serial for multiple spec files?

how does your command like to run tests look like?

npx playwright test tests/booking tests/admin-portal --headed

The tests/booking and tests/admin-portal are two sub folder which contain multiple spec files. Then Running 8 tests using 2 workers even I have set workers: 1.

dunno then, file a bug issue on github

if you set workers to 1 then it should use 1 worker

Related Discord Threads

AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email luc@ray.run.