playwright
playwright copied to clipboard
[Question] Is there a way to assign worker per directory?
I want workers to test basically in parallel, but sequentially in a directory. e.g. worker1 executes tests in directory1, worker2 executes tests in directory2...
Currently, workers are automatically assigned per file in default, that means both worker1 and worker2 execute tests in directory1 in parallel, then directory2.
Can any tell me how to assign worker per directory if the way exists.
At the moment, there is not a great way. There's some upcoming work on exposing a scheduler/grouping API to influence placement and order of tests.
Tagging this accordingly to more deeply review to determine if this will help in this use case.
In the interim, as a workaround, you can invoke npx plawright test <filter> several times.
Out of curiosity, can you elaborate more on your use case and why you are interested in this feature?
OK, I gonna separate my test command per file/directory at this time. I'm really looking forward to seeing the upcoming API!
Out of curiosity, can you elaborate more on your use case and why you are interested in this feature?
We put tests for search page of our app into search directory, and executing tests in parallel cause tremendous load.
(And some tests are failed with timeout or flaky)
So we wanna test them one by one in the directory, but in parallel in another place.
Maybe optimizing our search API can resolve this problem, but writing e2e-test is exactly for optimizing the app.
This may be related, if not please ignore.
Granted this is python, but this is how I am handling parallelism with remote execution.
https://github.com/Sam-H101/playwright-remote-orchestrator
All that is due to my strong desire to avoid selenium grid like the plague.
Why was this issue closed?
Thank you for your involvement. This issue was closed due to limited engagement (upvotes/activity), lack of recent activity, and insufficient actionability. To maintain a manageable database, we prioritize issues based on these factors.
If you disagree with this closure, please open a new issue and reference this one. More support or clarity on its necessity may prompt a review. Your understanding and cooperation are appreciated.