Question

There have been several questions about this on SO already, but none of the answers was satisfactory. I am doing test-driven grails development. However, because STS keeps crashing, I can't use it to run the unit tests and run them using "grails test-app" on the command line instead. This is fine, but when a test fails, it just won't print the REASON for the failure to the console. Using -echoOut and -echoErr as suggested in other threads does not help, this will only print stuff that was logged or printed during the test, but not the JUnit or Spock reason of failure. So currently, I always have to wait for the HTML to be generated and then find the failure in my browser and this reallly slows me down. I will accept any solution, no matter how hacky (i.e. hacking it into the grails source and recompiling it would be fine with me!).

Was it helpful?

Solution

You can do something like this...

grails test-app -echoOut -echoErr Something.testMain ; cat ./target/test-reports/plain/TEST-integration-integration-SomethingTests.txt
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top