11 March 2015

How to: Running a single Grails test class under a Maven-based IntelliJ project

Once I found a little bit difficulty to find in Google something about it, I'm posting here how to run apart (from the suite) a Grails test class using the IntelliJ's Maven run configuration template.

grails:exec -Dcommand=test-app "-Dargs=integration: com.your.package.YourClassSpec" -Dgrails.env=test -e

My trouble was how to run a single integration test class this way and I found the grace using the quoted -Dargs=integration <yourTestClassName> params. The quotes were the ace in the hole.
It seems kinda obvious. But it is not.


No comments:

Post a Comment