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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published yesterday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

62 views 0 4
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