On Aug 14, 2007, at 1:50 AM, Jörg Schaible wrote:
"mvn site" with cobertura in my pom.xml, the test appear to be run
twice, first 'normally' without cobertura enabled in the test phase,
and then a second time with cobertura enabled. Is there a way to
prevent this, so only the cobertura tests are run?
Again, use profiles. If the cobertura property is set, you may skip
the tests in surefire.
Ah, so I already have a profile that runs cobertura when I do -
Dcoverage=true, so you're suggesting setting the skip flag in the
same profile. I don't know why I didn't think of that before. When I
do that 'mvn -Dcoverage=true site' works as expected (skips tests,
enables cobertura), but I'd like to get cobertura to run when I do
'mvn test', which doesn't seem to work. I guess that's not as
important, but it would be nice if 'mvn -Dcoverage=true test' would
run the coverage test, just to keep the usage the same.
I'm still having trouble with cobertura though: It seems to
instrument my classes correctly (but maybe not?), but when I run a
test, I just see 100% coverage for a few core classes, and the rest
don't even show up in the HTML output. I checked and running
cobertura:instrument does generate target/cobertura/cobertura.ser,
but I don't know how to check if it worked correctly. Any hints?
-Josh
--
Joshua ChaitinPollak
Software Engineer
Kiva Systems
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email