I've been writing unit tests for the Cargo m2 plugin and it works quite
nice. I didn't feel any need for a framework. In some cases I've used jmock
to mock things.

You can check it out here:
http://svn.cargo.codehaus.org/cargo/trunk/extensions/maven2/src/test/

I agree with Brett about having a healthy balance of unit vs
integration/functional tests (in favor of unit tests in number), but there
must be functional tests as they are the only type of tests that prove that
it works (and it usually doesn't work).

Thanks
-Vincent

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Carlos
> Sanchez
> Sent: mardi 31 janvier 2006 01:57
> To: Maven Developers List
> Subject: Re: unit testing vs integration testing plugins
> 
> We probably need to provide some plugin test infrastructure like mock
> objects and utilities to do the common test tasks.
> 
> On 1/30/06, Brett Porter <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I wanted to get some feedback from other devs on this topic.
> > Historically, I think we've done very little of both and would like to
> > change that. But most of the tests cropping up seem to be integration
> > tests, because they are probably an easier mechanism than to setup the
> > preconditions of the plugin. However, they are much larger in terms of
> > creation, checkout space and time to run.
> >
> > I'd like to see that we "unit test" to the greatest extent possible.
> > IMO, the only reason to go to integration tests is to test lifecycle
> > interactions and interactions with other plugins.
> >
> > What we probably require to do this is convenience methods to construct
> > a decent project and settings object and an expression populator based
> > on the project and settings.
> >
> > Thoughts?
> >
> > - Brett
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to