I have tried doing the following but it is not working as expected:
class MyListener implements org.gradle.api.tasks.testing.TestListener
{
public void beforeSuite(TestDescriptor suite) {}
public void afterSuite(TestDescriptor suite, TestResult result) {}
public void beforeTest(TestDescriptor test) {}
public void afterTest(TestDescriptor test, TestResult result) {
if(org.gradle.api.tasks.testing.TestResult.ResultType.FAILURE.equals(result.getResultType())){
throw new GradleException(...)
}
}
}
I see the GradleException being thrown but the build only fails after all
the tests finished running.
What am I doing wrong?
Thank you for the help!
--
View this message in context:
http://gradle.1045684.n5.nabble.com/Stop-test-build-execution-on-first-failure-and-flag-build-as-failed-tp3782500p4372800.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