I can launch most tests quite conveniently from within IntelliJ on my Grails project using control-shift-F10. Now, however, we are trying to set up some functional tests using Geb and Spock and were having more troubles. The difficulty is this: when I go to run a Geb test, either by right clicking in the project menu or directly from the keyboard with alt shift F10, I seem to see different things at different times:
1) Sometimes I have an option of running the test as either a JUnit test or Grails
2) Sometimes it's only Grails
3) Sometimes the only option is JUnit
It's this last condition that the most troublesome, since the Geb tests really need to be run under grails, and not simply as JUnit tests. Is there any way to consistently get the Grails options OTHER than explicitly putting together a run configuration for each file I want to test ( because that's a bother )? And why am I getting these different results at different times? I've been trying to discern the pattern but so far it has escaped me. As the pattern just been a little too subtle for me so far, or is the behavior really nondeterministic?
Thanks for any light you can throw on this problem. We really like IntelliJ as an IDE, and we really like Grails and Geb as a development/testing environment, but getting them all to play together peacefully hasn't quite worked out yet.