Hi Jesse,

> -----Original Message-----
> From: Jesse McConnell [mailto:[EMAIL PROTECTED]
> Sent: vendredi 17 février 2006 20:40
> To: Maven Developers List
> Subject: plugin testing
> 
> brett asked me to look into the idea of a plugin testing framework and
> having mulled it over a bit and talked to some folks about it I wanted to
> spill out my thoughts here and a couple of stabs at breaking the nut
> cleanly.  Also, in the interests of having people read this and not have
> it
> drag on I'll jump right to the chase.

Hey thanks for taking this up! :-)

> We need someway to be able to gather code coverage metrics from plugin
> testing so we have at least a modicum of belief that changes didn't break
> anything, and since plugins can be so amazingly complex in many cases and
> just downright trivial in others there can't be a one size fits all
> solution....so
> 
> I propose that we break the problem down into two neat little parts.
> First
> would be actual plugin unit testing were we have a simple way to
> instantiating the plugin 

For unit testing, the way I do is simple: new MyPlugin()!

> and any of the pretty normal variables that get
> injected, collections, strings, bool, etc.  

I add setters to my plugins for this. BTW I have an example of unit testing
a plugin here: http://tinyurl.com/a2cmh

[snip]

> Now, some of plugins can be completely tested by this mechanism while
> others
> might not actually fit too tell into this lower level testing.  That is
> where the integration testing comes into more of a play.
> 
> I talked to john about this and we were kind of a mind that stubbing and
> mocking up these project objects and whatnot don't represent reality very
> well and perhaps the best solution would be to follow the route of the
> integration plugin where we can craft little projects in the plugin
> directory that represent real life usages of the plugin, then we verify
> that
> the right thing was done.  This verification could take the form of
> validating the resulting directory structure matched an outcome, certain
> files matched an outcome, or the state of objects in the project matched
> the
> template.

I agree about not mocking anything for integration testing. How is that
different from what the it and verifier plugin currently do?

[snip]

Thanks!
-Vincent


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

Reply via email to