Alex Shwarc
Alex Shwarc

Reputation: 885

Grails test execution against running app

Wondering if there a grails "command" in much the same way Yii framework for php has? It allows to run scripts like groovy console plugin. I just need to run some tests or scripts on current running app without starting another one environment which takes a lot of time.

I like Grails console, but maybe it's possible to run it from IDE (IDEA) ? Or even better to run tests the same way without need to restart an app. (compiling and database create-drop are annoying)

Tried to use --baseUrl with test-app, but it doesn't work, produces java.lang.IllegalStateException and it too slow too.

What could be the best way to run scripts on running app or tests?

UPDATE: THERE IS NOW run-script command anymore in Grails 3

Upvotes: 1

Views: 139

Answers (1)

Haider Ali
Haider Ali

Reputation: 342

You can use grails console plugin to run scripts on running enviorment

You Dependency: compile ":console:1.5.5"

For executing scripts from console .You can use

grails run-script src/scripts/appstatus.groovy

You can refer:

http://mrhaki.blogspot.in/2014/05/grails-goodness-run-groovy-scripts-in.html.

If that answers your question

Upvotes: 1

Related Questions