Cobertura always displays 0% code coverage for unit tests

Description

run mvn cobertura:cobertura against any project directory. We also need to make sure the cartridge and metafacade tests which generate from test models also produce code coverage.

Environment

AndroMDA 3.4-SNAPSHOT

Activity

Show:
Former user
March 9, 2011, 3:11 AM

http://jira.codehaus.org/browse/MCOBERTURA-62

Looks like we would need to fork a new JVM for a Andromda-Test-Build to get cobertura working....

Bob Fields
June 16, 2011, 3:05 AM

The 0% coverage appears to be fixed with the latest patch of cobertura-plugin, it now gives coverages for projects where code is not generated through the andromda plugins. When the cartridgetest plugin is invoked, it gives a NoClassDefFoundException on a cobertura dependency because it is trying to run the instrumented code after changing the test dependencies when running the unit test to verify results. Should be pretty easy to fix, just add the cobertura test dependency to that plugin invocation, or fix the cartridge-test-plugin to include that dependency automatically. I'm not sure if it will give the same error with 0% coverage after that is fixed, though.

Assignee

Former user

Reporter

Bob Fields

Labels

None

Components

Affects versions

Priority

Minor
Configure