Quality is delighting customers
Thanks for your reply.
Using TestNG framework and little changes to the XML file we can rerun all failed scripts without much effort.
We can use TestNG class and specify the failed_test.xml path to the TestNG to run the failed test cases. For more details, View below link:
Normally in automation after executing scripts/tests, we will check for the results and if the test fails because of above reasons we will re-run then again.
Instead of that we can ask Selenium/testNG to execute the failed test cases again for X (we can define) number of times and check for the updated results.
To achieve this we need to implement TestNG IRetryAnalyzer.
you will find detailed coding here