Search code examples
grailsguardreloading

Grails not reloading in test environment


I'm testing my app in the interactive console, which I access by 'grails-debug test'.

Then I run my integration tests 'test-app integration:' which goes fine.

But when I change any of my controllers that are being tested, the change does not take effect in my tests results, and I have to quit interactive mode and access it again.

How can I make my tests reload my controllers?

P.D.: My question is much motivated by Grails Guard plugin, which indicates in its usage seccion:

'Ensure that the spring reloading agent is active for test-app (it is NOT by default for test-app, only run-app).'


Solution

  • Add -reloading to your grails call as the first parameter.