Rerun failed tests on the base of testng-failed.xml

Could you please suggest how to re run all failed tests using testng-failed.xml.

I’ve found old forum topic on this question, and tried to reuse the last suggestion of Rene:

First of all I wasn’t able to change testReportDir - Cannot set the value of read-only property ‘testReportDir’ for object of type org.gradle.api.plugins.JavaPluginConvention.

Secondly, after test suite from 2 simple tests run (one test was successful and one fails) - failed test wasn’t re run.

How to set up such case appropriately? Also, if someone has such experience, how does this works with Jenkins - new build should be automatically started?

Did you find an issue? This doesn’t work for me(