Grails war and include tests

I am looking for a way to run tests on war command of grails. War should not be created if test fails. I have searched a lot but did not find anything, Anyone has experience with this?

Thanks in advance

2 answers

  • answered 2018-01-11 19:42 Dónal

    Run this on the command line

    grails test-app && grails war
    

    The second command won't execute if the first command fails

  • answered 2018-01-11 19:42 Evgeny Smirnov

    Add this to your build.gradle:

    war.dependsOn test