[ http://jira.codehaus.org/browse/MCOBERTURA-62?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Derek Clarkson closed MCOBERTURA-62. ------------------------------------ Resolution: Won't Fix Ok, not your issue. After some research I found that Cobertura only writes the files after the JVM closes down. I was running the tests within the same JVM so no data had been written to the file and therefore nothing was reported. I'm currently re-writing the plugin to fork a jvm so that the results can be written. There is documentation on the Cobertura site about how it writes data. > 0% coverage being reported even though tests have run. > ------------------------------------------------------ > > Key: MCOBERTURA-62 > URL: http://jira.codehaus.org/browse/MCOBERTURA-62 > Project: Maven 2.x Cobertura Plugin > Issue Type: Bug > Affects Versions: 2.1 > Environment: Both 2.1 and 2.0 releases. > Reporter: Derek Clarkson > > The plugin correctly instruments the code and puts the .ser file location > into the system properties. I then fire a custom plugin which runs JUnit4 > tests. It uses the instrumented classes in it's class path and runs all tests > correctly, producing output in it's report directory. The cobertura plugin > then generates it's reports which find 0% coverage. > Looking at the system the instrumentation, system property and reporting > phases all make reference to the <project>/target/cobertura/cobertura.ser > file. Looking at the file it would appear that no data in being appended to > it when the test are being run. Apart from looking at the URLs passed to the > classloader running the test code I cannot see any way to confirm it is > running the instrumented code. BTW the urls are > <project>/target/generated-classes and also > <user-home>\.m2\repository\cobertura\cobertura\1.8\cobertura-1.8.jar > I've tried this same project with the 2.0 (cobertura 1.7) plugin and got the > same results. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email