Bruce Snyder wrote:
This one time, at band camp, Dain Sundstrom said:
DS>Can we change the build system to by default only run the module unit
DS>test if something changed in the module?
DS>
DS>When we get integration tests, I would like the default to by default
DS>only run the integration if something changed in the domain being
DS>tested, but that is for the future.
This is a good argument, especially as more tests are added. Does anyone
know how this can be accomplished in Maven?
It won't be easy. If you are talking about binding a test to an implementation,
then there is a bunch of infrastructure things that would need to happen first.
For example if you want to only run the ThingTestCase if the Thing source code
changes, you have to have a way to bind the two together.
My suggestion is to group your tests into functional units so that you test a
Jar at a time. That would encourage Geronimo to have a group of JAR files
instead of one big one. That way you can at least confine the tests to be
run on a small part of Geronimo instead of the whole thing at once.
It will also help developer not get overwhelmed at the number of tests in the
whole system. I believe the Maven reactor builds can determine if sub-projects
are up to date and skip the build/test cycle for those sub-projects.
Not exactly sure how it works though. I saw Stephen McConnell on the list,
and I believe he has a better idea of how to put it together. Of course,
you could take it to the Maven user's list...
--
"They that give up essential liberty to obtain a little temporary safety
deserve neither liberty nor safety."
- Benjamin Franklin