This feature is supported in the Ultimate edition only.
IntelliJ IDEA enables creating and running unit and integration Grails tests, and provides run configurations for each test type.
- Use scaffolding of a domain class you want to create a test for:

-
Run Grails target: press ⌥⌘G⌥⌘G⌥⌘G⌃⌥G⌃⌥G,
and type the target name in the text field. Use code completion to narrow down the list of matching targets:

- In the Grails view, right-click one of the test directories, point to
on the context menu, and then choose one of the suggested options:

- In the Run/Debug Configuration dialog that opens, specify the run/debug
configuration settings:test type, Grails scripts etc.
You can specify several test names separated with spaces, all these tests will run in a single run configuration.
- In the Grails view, select the desired test class.
- In the menu that opens, select Run and the desired configuration type:

The selected run/debug configuration is executed in the Run tool window.