Open dik-garri opened 2 years ago
There's an open PR that is on the way to addressing this: https://github.com/microsoft/playwright/pull/17548
Any updates on this issue?
Are there any updates on this issue? This is a very important feature for our purposes
I'm hoping for this functionality as well.
Any update on this feature @mxschmitt ? Would very much like this functionality so I have more flexibility in using parallel testing.
Upvote to this feature, and wonder why PR https://github.com/microsoft/playwright/pull/17548 is removed
Same here, we really need this one.
Today there is no way to tell playwright, run these test files sequentially, but inside each test file, go full steam and run tests in parallel.
@younesjallouli Have you tried the following?
In the playwright.config.ts file you can set the dependencies:
In the package.json file you can set the following:
When running your tests, you can set the workers: npm run tests:exampleTests -- --workers 4
These test files will be run in sequential order: setup, CreateExampleA, CreateExampleB, CreateExampleC
These test files will be run in parallel: UpdateExampleA, UpdateExampleB
Inside each test file you can set .parallel to run testcases within a test file in parallel (or decide not to add .parallel for sequential running of testcases within a file).
Downside to this method is when you have a file that has to be ran in sequential order and also contains testcases that cannot be run in parallel, since it will only use one worker and slows down the total run speed.
I don't think this is the solution I was hoping for. To give context: to test our SaaS app, we have multiple tests across multiple files, and we run these tests in parallel on multiple workers. However, you need to create some objects in previous tests, before moving on to the next tests (like testing registering a payment method, before testing the creation of a payment, before testing a refund of that payment). We do not believe in loading data in the DB and maintaining those scripts.
In an ideal world, there should be a mode in Playwright that tells Playwright to run files sequentially (create payment method first, then create payments, then ...) without even having to specify the test file names in the config files. Even if workers become available playwright should not pick up tests from the following file until the current file is 100% done.
I don't think this is the solution I was hoping for. To give context: to test our SaaS app, we have multiple tests across multiple files, and we run these tests in parallel on multiple workers. However, you need to create some objects in previous tests, before moving on to the next tests (like testing registering a payment method, before testing the creation of a payment, before testing a refund of that payment). We do not believe in loading data in the DB and maintaining those scripts.
In an ideal world, there should be a mode in Playwright that tells Playwright to run files sequentially (create payment method first, then create payments, then ...) without even having to specify the test file names in the config files. Even if workers become available playwright should not pick up tests from the following file until the current file is 100% done.
I believe I have the same situation as you here: https://github.com/microsoft/playwright/issues/29282. I was using serial mode, but it's not recommended, maybe you can try this solution https://github.com/microsoft/playwright/issues/29282#issuecomment-1920505421, I'm using project dependencies for multiple applications.
Any news on @dik-garri 's request playwright team? @yury-s @mxschmitt @pavelfeldman
This feature is a no-brainer for me. It was asked many times by the community
@mxschmitt any update on this ?
I don't think this is the solution I was hoping for. To give context: to test our SaaS app, we have multiple tests across multiple files, and we run these tests in parallel on multiple workers. However, you need to create some objects in previous tests, before moving on to the next tests (like testing registering a payment method, before testing the creation of a payment, before testing a refund of that payment). We do not believe in loading data in the DB and maintaining those scripts.
In an ideal world, there should be a mode in Playwright that tells Playwright to run files sequentially (create payment method first, then create payments, then ...) without even having to specify the test file names in the config files. Even if workers become available playwright should not pick up tests from the following file until the current file is 100% done.
I agree, I wish playwright would have that feature wherein we can prioritize a test first before running another set of tests.
+1, feature would be helpful.
+1
+1
@yury-s @mxschmitt @pavelfeldman Please some update :D
As a playwright user, I want to be able to run some spec files in parallel and some in a specific order at the same time. I have a situation when I have a lot of spec files and some of them depend on others. Currently, I turned off parallel execution
workers: 1
but it increases time on all tests execution a lot