This thread is trying to answer question "How can I retry failed test cases after all the test cases have been run in Playwright?"
No, all of my tests are independent of each other. What I am looking for is that suppose there are tests such as a,b,c,d,e. Now we run the tests and we observer b and d fails so I want those failed tests to be retried once again at the end. So sequential execution should look like a,b,c,d,e,b,d
Is this running locally or in CI build? I do not think this is possible in playwright, but if you want to rerun failures, you could add a process that at the end of each test if failure then write to a list file. Upon completion you could run a script to rerun the test files in the list file. Again, this is guess on what you want. I do not think Playwright has the functionality to retry after all tests run the failed tests. You may need to make something to do this.
Thanks @nzcarnage for the idea. I have already implemented and found a way through custom reporter. If you guys are interested, then have a look at https://github.com/microsoft/playwright/discussions/23940
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.