Can I include line coverage in Clover Ant xml report?

Clover 3.1.0 + Jenkins + Ant + Java 6

How can I make <line ... /> elements appear in my clover xml report using the Ant tasks?

I want to feed my Clover coverage statistics into Sonar to view alongside other metrics on the codebase. The project is built in Ant and I am using the <clover-report> task to generate an xml file with details. However, I cannot see the coverage details in Sonar, and I think it is because of those missing values.

It was suggested that the I check the format of my report to see if it was different from their test cases (https://svn.codehaus.org/sonar-plugins/tags/sonar-clover-plugin-2.8/src/test/resources/org/sonar/plugins/clover/XmlReportParserTest/clover.xml). Sure enough, my report does not contain per-line counts (the <line ... /> elements in the example above are not present in my report. How can I cause them to be there? They appear without effort on maven projects.

... Or can someone more familiar with Sonar give me a better suggestion?

1 answer

http://confluence.atlassian.com/display/CLOVER/clover-report

could you be forgetting to include references to the sources in the <clover-report> ?

<clover-report>
<fileset dir='src/main'/>
</clover-report>

Suggest an answer

Log in or Join to answer
Community showcase
Teodora [Botron]
Published Thursday in Marketplace Apps

Jira Inferno: The Nine Circles of Jira Administration Hell

If you spend enough time as a Jira admin - whether you are managing a single, mid-sized instance, a large enterprise one or juggling multiple instances at once - you will eventually find yourself in ...

304 views 0 12
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot