The MetaSieve Blog

March 17, 2010

Continuous Testing with Grails

Filed under: Uncategorized — Tags: , , — Björn Wilmsmann @ 12:37 am

I’ve just released a new Grails plugin called AutoTest. AutoTest provides an automatic (or continuous) testing feature for Grails. After having installed AutoTest you will be able to run the following new Grails script:

grails auto-test

This will start a continuously running Grails test process. Once you modify and save a file within your Grails project unit and integration tests (and as a matter of fact any kind of tests added by plugins) will be run against the new version of the changed file.

This allows you to get continuous feedback on code changes without having to switch between editor and terminal.

For more information, please have a look at the plugin documentation

Advertisements

5 Comments »

  1. I’m getting problem with your plugin when using Shiro plugin for authorization. Maybe you can suggest where to dig for solution. Pasted the stacktrace below. Error occurs when any file is updated.

    org.codehaus.groovy.grails.exceptions.NewInstanceCreationException: Could not create a new instance of class [ShiroGrailsPlugin]!
    at _PluginDependencies_groovy$_run_closure5_closure40.doCall(_PluginDependencies_groovy:268)
    at _PluginDependencies_groovy$_run_closure5_closure40.doCall(_PluginDependencies_groovy)
    at _GrailsSettings_groovy$_run_closure10.doCall(_GrailsSettings_groovy:280)
    at _GrailsSettings_groovy$_run_closure10.call(_GrailsSettings_groovy)
    at _PluginDependencies_groovy$_run_closure5.doCall(_PluginDependencies_groovy:266)
    at AutoTest$_run_closure1_closure7.doCall(AutoTest:98)
    at AutoTest$_run_closure1_closure7.doCall(AutoTest)
    at AutoTest.checkModificationTime(AutoTest:137)
    at AutoTest.this$4$checkModificationTime(AutoTest)
    at AutoTest$_run_closure1.doCall(AutoTest:87)
    at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381)
    at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415)
    at gant.Gant$_dispatch_closure7.doCall(Gant.groovy)
    at gant.Gant.withBuildListeners(Gant.groovy:427)
    at gant.Gant.this$2$withBuildListeners(Gant.groovy)
    at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
    at gant.Gant.dispatch(Gant.groovy:415)
    at gant.Gant.this$2$dispatch(Gant.groovy)
    at gant.Gant.invokeMethod(Gant.groovy)
    at gant.Gant.executeTargets(Gant.groovy:590)
    at gant.Gant.executeTargets(Gant.groovy:589)
    Caused by: java.lang.NoClassDefFoundError: org.apache.shiro.grails.RealmArtefactHandler
    at ShiroGrailsPlugin.class$(ShiroGrailsPlugin.groovy)
    at ShiroGrailsPlugin.$get$$class$org$apache$shiro$grails$RealmArtefactHandler(ShiroGrailsPlugin.groovy)
    at ShiroGrailsPlugin.(ShiroGrailsPlugin.groovy:70)
    … 21 more
    Error loading plugin manager: Could not create a new instance of class [ShiroGrailsPlugin]!

    Comment by Vladimir Grichina — August 26, 2010 @ 1:15 am

  2. Yeah, this might be caused either by a new Grails version or specifically by this plugin. AutoTest hasn’t been tested yet for a wide range of plugins.

    Comment by Björn Wilmsmann — September 3, 2010 @ 11:25 am

  3. Björn, can we somehow cooperate on resolving the issue?

    Comment by Vladimir Grichina — September 6, 2010 @ 1:27 am

  4. I’d be glad to further the development of this plugin. However, given that during the recent Grails updates there’ve been quite a few changes, it might be necessary to re-write the plugin from scratch to make it work with the current Grails version and plugins. What do you suggest?

    Comment by Björn Wilmsmann — September 6, 2010 @ 2:15 am

    • I’m not sure where to start. I’ll try doing some debugging when I have time. Would be cool if you publish source code on GitHub though, it would be easier to organize development.

      Comment by vgrichina — September 21, 2010 @ 11:59 pm


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: