On 22 February 2011 04:00, Ewerton Vale Leal <[email protected]> wrote: > I made the recommended changes. > directory structure > src / test / java - unit tests > src / it / java - integration testing > and I'm using the plugin "maven-failsafe-plugin" for integration tests. > Now the tests are run at different phases. > This is the execution order: > 1. runs the unit tests > 2. start selenium > 3. start cargo > 4. runs the integration tests > 6. stop selenium > 7. stop cargo > 8. run the plugin "cobertura-maven-plugin" > 9. run the unit tests again > 10. makes the coverage of unit tests. > 11. and ends > Still not doing the coverage of integration tests. > pom.xml in annex.
Mmmh, it seems that the Cobertura Maven plugin runs in its own lifecycle and only triggers the test phase. It's a known bug (or feature for some) that it runs the unit tests a second time. Option 1: Take this to the Cobertura mailing list and ask there. That list doesn't seem very active so I don't know how helpful it's going to be but it's the best place to ask. Option 2: Make your integration tests run in test instead of integration-test and do some extra work to hammer the square peg that is Cobertura into the nice round hole we have. It's possible but not easy, I think. Option 3: Check out Emma or another coverage tool, maybe there are better behaved alternatives. Sorry, I didn't think this would be so hard. I would think it a fair request to want to know the coverage of your integration tests. (At least you now have a clean, maintainable setup for your unit and integration tests. :-) ) --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
