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 Sign up to answer
Community showcase
Published an hour ago in Jira Ops

Jira Ops Early Access Program Update #2: Let’s talk severity levels

Welcome to your weekly Jira Ops Early access program update, where we’re sharing news and updates on Jira Ops' progress as we work toward our 1.0 release. If you ever want to drop us feedback or idea...

9 views 0 0
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