Hello,
I have some long running integration tests and I would like these tests to make the build fail ‘fast’. Currently, if I have a failure, the test task still attempts to execute the remaining tests. Only after all of them executed, I get the build failure.
How can I make it so when I have a failure, everything stops there and the build is flagged failed right after the first failure?
I tried this one, but still can not stop gradle
afterTest { desc, result ->
println "Executing test ${desc.name} [${desc.className}] with result: ${result.resultType}"
if (${result.resultType} == 'FAILURE'){
throw new GradleException("Test failed!")
}