Rayrun
โ† Back to Discord Forum

Limit number of workers for only one file

Is there a way how to limit number of workers for one test file? I have a test set which I run on 3 browsers in parallel using multiple workers. However now I need to add a test which cannot be run at multiple instances at the same time. It is fine to run it multiple times sequentialy.

This thread is trying to answer question "Is there a way to limit the number of workers for one test file?"

4 replies

Limit number of workers for only one file

not possible as far as I know

it's not even configurable per project basis, you basically need to run npx playwright test ... twice; good thing though that you can merge reports into a single one so it wouldn't look like you ran two commnds

I'd be curious if this might work, Taking a guess... but if you have muiltiple spec files have everything to run fully parrallel, but in the one spec file you put in:

test.describe.configure({ mode: 'serial' });

Might be me but serial implies one at a time, making sure i'm not smoking crack i look up "opposite of serial" lookie there parallel popped up ๐Ÿ™‚

https://playwright.dev/docs/test-retries#serial-mode

I tried it, but it only ensures that tests in the describe block are run in a sequence. However the block of tests will still run in multiple projects at the same time ๐Ÿ˜ž

Related Discord Threads

TwitterGitHubLinkedIn
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 [email protected].