playwright icon indicating copy to clipboard operation
playwright copied to clipboard

[Question] Need to make single test not run in parallel while running on multiple browsers

Open mrrinatino opened this issue 2 years ago • 2 comments

Hi My scenario is this. In the configuration file, I have it written to run tests in parallel in three browsers by default. But I have tests that need to be run sequentially in each of the browsers, otherwise, actions will be overwritten. How can I write in a test to run it consistently across browsers? test.describe.serial doesn't work here, playwright still runs it in three browsers at once.

mrrinatino avatar Sep 17 '22 21:09 mrrinatino

Sorry, find question #14419 Maybe there is an update?

mrrinatino avatar Sep 17 '22 22:09 mrrinatino

There are a number of issues we are aiming to resolve in the coming releases with a more explicit scheduler API so test and project execution can be influenced by the user. Stay tuned!

But I have tests that need to be run sequentially in each of the browsers, otherwise, actions will be overwritten.

Can you explain more about this? What does "actions will be overwritten" refer to?

Depending on the answer to above, there may be a way to modify your tests to allow for parallel excution in the three browsers.

In the interim, you can put in different project and run each project separately. (i.e. one invocation of npx playwright test per project.

npx playwright test --project=A
npx playwright test --project=B
npx playwright test --project=C

rwoll avatar Sep 19 '22 18:09 rwoll

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.

pavelfeldman avatar Nov 16 '23 04:11 pavelfeldman