Graeme, I hope you are still watching this issue, I need some help
We can now do "Run As >> Grails Command (test-app)" on the following three selections in Eclipse
- Grails project => runs "grails test-app" command
- Grails test/unit folder => runs "grails test-app -unit" command
- Grails test/integration folder => runs "grails test-app -integration" command
This should be in the next milestone release that's coming out any day now.
The test results get opened after the command finishes. This is really just a quick hack and I see the following problems with it:
1) We don't see the "progress" in the viewer while the tests are running.
2) We can't relaunch (a specific) test(s) by clicking on them in the viewer.
3) We are loosing the System.out and System.err output produced by the tests (I think grails captures it and stores in some of the files produced by the test run, but they don't show in the Console view and the JDT viewer doesn't provide any GUI to view them).
I think that 1) and 2) are really things that user's want and should be in a reasonable implementation of testing support for Grails/Eclipse.
I believe that it would be feasible to get 1) addressed by using the BuildListener mechanism.
But how do we allow the user to re-run specific tests by selecting them from the UI? I.e. is there a way to tell Grails to run a specific test.
I was looking at
but it looks like there's no way to tell Grails to run a specific test-method in a specific class.
I also tried to look for "DefaultGrailsTestRunner" mentioned above as a possible way into this... but it seems that class no longer exists.
Any hints or pointers in the right direction much appreciated.