Colin Sampaleanu <[EMAIL PROTECTED]> writes:

> I love unit tests, but I simply don't buy the argument that you must
> always run them to build a certain artifact (jar, war, ear, etc) under
> _all_ circumstances. I gave the example of the property file
> change.  An even better example is if I run
>   maven java:jar
> which runs unit tests, but afterwards realize I wanted to do
>   maven jar:install
> instead. Now I have to sit through a bunch of unit tests when I
> basically know for sure that nothing has changed, and all I want to do
> is deploy the jar I've already built. Same applies to building a war,
> etc. When you get to reactor based builds of multiple projects wasted
> time becomes evan more critical.

I understand the jar:install / war issue.  It would be nice to have
the test runs also dependant on code/class file changes.  
So if no code is altered, the tests won't fire automatically?
 
> Unit tests are a very important part of agile methodologies; so is a
> rapid build/test cycle, and part of that implies being able to control
> exactly and precisely what to build and test. When you have a toy
> project, it's easy to say, "build and test everything". When you have
> a big project with unit tests that take 2-3 minutes, I need some
> mechanism where I can turn off testing everything and specify that I
> want to test only one class, or one area. This can make the difference
> between getting in  20 cycles in an hour vs 5 cycles in an hour, for
> example. Having to modify project.xml is not easy/fast enough...

Regardless of the size of the project, if your tests are slow it sucks
and we don't want to run them as often.  The situation I'm in ( not
using maven for this yet ) is we start with all the tests in the
*unit* test level.  If there are some that are slow or require
external resources that are slow ( like a db ) we move them out into
some other test run or rewrite them to be faster ( mostly we do the
first ).
 
> I've now read the thread you were talking about. I am willing to make
> changes and supply patches to allow tests to be controlled in a
> conditional fashion, If a committer is willing to check them in.

If your thinking of having levels or rings of tests, I'm +1.

-- 
=====================================================================
Jeffrey D. Brekke                                   [EMAIL PROTECTED]
Wisconsin,  USA                                     [EMAIL PROTECTED]
                                                    [EMAIL PROTECTED]

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

Reply via email to