You'll need to configure the `test` task to run the `testng-failed` suite. Something like:
test { useTestNG { suites "testng-failed.xml" // adapt path as necessary } } To make this controllable from the command line, you can either introduce a second task `testFailed` or configure the existing task conditionally: test { if (project.hasProperty("failed")) { useTestNG { suites "testng-failed.xml" // adapt path as necessary } } } Then you can run the task like so: gradle test -Pfailed -- Peter Niederwieser Principal Engineer, Gradleware http://gradleware.com Creator, Spock Framework http://spockframework.org Twitter: @pniederw -- View this message in context: http://gradle.1045684.n5.nabble.com/Gradle-n-TestNG-fail-case-rerun-tp5449411p5453973.html Sent from the gradle-user mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email