Hi all, I have total of 6 playwright tests and i want to execute them in this order:
How can i implement this with playwright nodejs?
Thank you in advance 🙏
This thread is trying to answer question "How can I execute Playwright tests in a specific order, with one test running in serial mode and the rest running in parallel mode?"
@xotabu4 I am not able to understand how to implement above test order using test.describe.configure function.
But I have another approach in mind. What about if I run my first test in beforeAll hook and then run all tests in parallel mode. Is this an anti pattern to run a test in beforeAll hook?
@xotabu4 yes i understand above code will run serially. But my usecase is after first test, all other tests can be run in parallel mode instead of serial. If i have set number of workers as 3 in
playwright.config.ts file and my all tests are in a different files, then how can i ensure tests 2...6 run only (in parallel) when test1 is finished. Can we add a test (test 1 in my case ) as dependency for other tests?
Then i would setup Projects -> Dependencies -
And set your file that should run serial as dependency for other tests
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 firstname.lastname@example.org.