On Dec 8, 2006, at 12:24 PM, Rajith Attapattu wrote:
I have seen this behavior (what Kim described), most of the time it
hangs
and sometimes it will fail.
If we can move all the integration type of tests outside the code
base then
we want have this problem.
This sort of inconsistent behavior has forced me to skip the tests
using -
Dmaven.test.skip most of the time which is not a good practice.
Can we have only unit tests as part of the main build, and perhapse a
different goal (or phase if thats the right terminology) to run the
integration tests.
For unit tests it's illegal by definition to make connections (in
VM or
otherwise), to have threads blocking for messages/requests/reponses
or chain
tests together etc.
If we need to test connections or request/response scenario as part
of the
main build then lets use mock objects (EasyMock or whatever) and
lets move
the other stuff to systests.
A big +1. I've mentioned several times the need for more test
reorganization. And I strongly recommend Easymock for unit testing,
it's really nice and quite powerful.
Also, Steve can we use a code coverage tool with maven ? I suspect
that we
have very little unit test coverage and more integration type of
tests.
Sure, just type
mvn cobertura:cobertura
In both Spanish and Portuguese, "cobertura" means "coverage." Running
this will generate HTML reports about unit test coverage, which as
you've correctly guessed, is quite low.
--steve