[
http://jira.codehaus.org/browse/MCOBERTURA-70?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=252058#action_252058
]
Atanu Panda commented on MCOBERTURA-70:
---------------------------------------
HI Friends,
I have the same problem. I have found that though the unit tests have been run
successfully, but code coverage is showing as 0%.
Log message is attached below
===========
.
.
Successful Testing.....
tearDown.....
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 22.562 sec
Results :
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0
[INFO] [cobertura:cobertura {execution: default-cli}]
[INFO] Cobertura 1.9.2 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file
Cobertura: Loaded information on 103 classes.
Report time: 8281ms
[INFO] Cobertura Report generation was successful.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
.
.
===========================
My plugin configuration is as follows
--------------------------
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.5</version>
<configuration>
<includes>
<include>**/*Test*.java</include>
</includes>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.3</version>
<configuration>
<includes>
<include>**/*Test*.java</include>
</includes>
<forkMode>once</forkMode>
</configuration>
</plugin>
-------------------------------
Please help me out. Please let me know if you need any other information.
Thanks
Atanu Panda
> I must run 'mvn cobertura:cobertura' twice to get a valid coverage report.
> --------------------------------------------------------------------------
>
> Key: MCOBERTURA-70
> URL: http://jira.codehaus.org/browse/MCOBERTURA-70
> Project: Maven 2.x Cobertura Plugin
> Issue Type: Bug
> Affects Versions: 2.1
> Reporter: Gary Kind
> Attachments: CoberturaDataUtil.java, CoberturaReportMojo.java,
> ConditionalSaveTimer.java, ProjectData.java
>
>
> Our nightly build does:
> 'mvn clean'
> 'mvn install'
> 'mvn cobertura'
> 'mvn site'
> We have found that for the last couple of months (or possibly more), our
> coverage reports are showing 0% coverage on all tests. I have found that we
> have to run 'mvn cobertura:cobertura' TWICE! to get a valid coverage report.
> What gives? Is there any workaround? I have tried all sorts of things but
> nothing really works.
--
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