Permission to publish plugin: Grails Guard

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Permission to publish plugin: Grails Guard

longwa
Hello,
I'd like to publish a plugin which somewhat mimics the behavior of "guard" in Rails. Basically, it puts the equivalent of "test-app integration:" in a loop
and re-runs the given tests automatically whenever the tests or any grails artifacts change.

I had a bit of discussion with Peter a few days ago on the list and have redesigned based on his feedback (original discussion called it a spork plugin).

----------------------------------

Plugin Name: Guard
Username: longwa


FYI, It's a bit hard to write automated tests for this plugin since it actually IS part of the test framework so suggestions are welcome on that front. I have a few sample tests and service to use for manual testing.

Rgds,
Aaron
Reply | Threaded
Open this post in threaded view
|

Re: Permission to publish plugin: Grails Guard

pledbrook
> FYI, It's a bit hard to write automated tests for this plugin since it
> actually IS part of the test framework so suggestions are welcome on that
> front. I have a few sample tests and service to use for manual testing.

It's worth looking at this project, which is designed to test the test
framework:

    https://github.com/grails/grails-testing-tests

Peter

--
Peter Ledbrook
Grails Advocate
SpringSource - A Division of VMware

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Permission to publish plugin: Grails Guard

longwa
Nice, I'll take a look. There are definitely some challenges even with this framework since the code I wrote is designed to loop, driving it and killing it gracefully become a problem. I guess I could use a poison file to tell it to end gracefully, similar to what I think the _GrailsRun script uses.

Is the plugin publishable without trying to integrate that level of automated testing?

-Aaron

On Fri, Jun 15, 2012 at 10:56 AM, Peter Ledbrook <[hidden email]> wrote:
> FYI, It's a bit hard to write automated tests for this plugin since it
> actually IS part of the test framework so suggestions are welcome on that
> front. I have a few sample tests and service to use for manual testing.

It's worth looking at this project, which is designed to test the test
framework:

   https://github.com/grails/grails-testing-tests

Peter

--
Peter Ledbrook
Grails Advocate
SpringSource - A Division of VMware

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|

Re: Permission to publish plugin: Grails Guard

pledbrook
> Nice, I'll take a look. There are definitely some challenges even with this
> framework since the code I wrote is designed to loop, driving it and killing
> it gracefully become a problem. I guess I could use a poison file to tell it
> to end gracefully, similar to what I think the _GrailsRun script uses.
>
> Is the plugin publishable without trying to integrate that level of
> automated testing?

Yes, and I've now added the requisite permissions. But before you
publish, have you looked at the Auto Test plugin?

    http://grails.org/plugin/auto-test

I've only just remembered it, but reading your docs reminded me that
it behaves in a similar way. Would it make sense merging the two?

Peter

--
Peter Ledbrook
Grails Advocate
SpringSource - A Division of VMware

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Permission to publish plugin: Grails Guard

longwa
Hmmm, I saw that plugin, but I couldn't seem to get it to work (at least in my environment). Plus, looking at the source, I can't see how he could possibly be reloading changes to services, controllers, etc. while the command is running. When I run the auto-test command via his instructions, the reloading agent isn't added to the JAVA_OPTS so even though he is invoking compile() to recompile changes, I don't see how they could be reloaded into the running test loop. This was one of the main reasons I originally started with the idea of running inside a server instance, but I eventually found the GrailsProjectWatcher and it's addListener() interface worked perfectly for what I needed. The only downside (as I mention in the docs) is that you must specify the -reloading arg or you'll only pickup changes to your test cases, not the application code.

Also, the interface to my plugin is via a new test phase instead of a custom script. This has an additional advantage in that my editor (IntelliJ) still thinks I'm running test-cases and will happily keep reporting and formatting test output in the loop.

I feel like my approach is a little more "modern" for Grails 2.0 but I will definitely reach out to the auto-test author about merging them together. I certainly don't want to muddy the plugin waters with multiple similar plugins.

-Aaron

On Fri, Jun 15, 2012 at 12:05 PM, Peter Ledbrook <[hidden email]> wrote:
> Nice, I'll take a look. There are definitely some challenges even with this
> framework since the code I wrote is designed to loop, driving it and killing
> it gracefully become a problem. I guess I could use a poison file to tell it
> to end gracefully, similar to what I think the _GrailsRun script uses.
>
> Is the plugin publishable without trying to integrate that level of
> automated testing?

Yes, and I've now added the requisite permissions. But before you
publish, have you looked at the Auto Test plugin?

   http://grails.org/plugin/auto-test

I've only just remembered it, but reading your docs reminded me that
it behaves in a similar way. Would it make sense merging the two?

Peter

--
Peter Ledbrook
Grails Advocate
SpringSource - A Division of VMware

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email