Historical Charts are not displayed for Clover Code Coverage in Bamboo


I am evaluating Bamboo-Clover integration for distributed code coverage. I was successful in getting the aggregated code coverage in my integrated environment. However, the historical charts in Bamboo under Coverage Summary Section are not displayed.  


I am running Bamboo 5.8.1 and clover version is 4.0.3.  

Have used the following command to create the history point. 

clean clover2:setup verify clover2:save-history clover2:clover 

Please let me know if am missing any specific configuration required to display Historical charts (Total Coverage Percentage, Lines of Code, Non-Comment lines of code).




2 answers

1 vote

Hi Murthy,

There are two kinds of historical charts:

  • one set of charts is being generated by the Bamboo Clover Plugin (Total Coverage, Lines of Code, Non-comment Lines of Code); they are being displayed on a Plan Summary page, on the Clover tab; in order to have them generated, three conditions must apply:
    • Clover configured in your Maven task must generate XML report (clover2:clover generates both XML and HTML by default)
    • XML report must be found by the Bamboo Clover Plugin (which means that you shall have a correct path in the "Clover XML Location" field on the Miscellaneous tab)
    • your build history must span at least for two days (as these charts show data grouped by day)
  • second set of charts is being generated by the Clover itself; it can contain any number of charts with any metrics provided by Clover; these charts are displayed on the HTML historical report - you can access them from the 'Linked reports' drop down located on the blue header; report itself is accessible from the "Clover" and the "Artifacts" tabs; in order to have it generated:
    • you must have at least two historical snapshots (clover2:save-history); please ensure that you don't delete them between builds; please also ensure that you're running Clover on one agent or use a location shared by many agents (otherwise each agent will have it's own set of history snapshots)
    • you must generate HTML report with a historical section enabled (the maven.clover.generateHistorical is false by default)


Thanks for reply Marek. Here is the additional information.

Our build has a job with multiple tasks.

1. Checkout

2. Package

3. Install/Deploy the Addon on Remote Target Instance (JIRA/Confluence)

4. Run the Integration tests on the Remote Instance

Automatic Integration Case:

Our integration tests use the same clover.db (shared folder on network path) and we are able to get the coverage reports for complete distributed

 coverage. But the historical reports are missing. We are able to view only Unit test reports on historical reports. We see that Clover runs

  the save-history as part of maven package and since the integration tests are executed later they are not accounted in the historical reports.

Hence  we guess we are missing the historical reports. Is that a correct assessment ?

Manual Integration Case:

If we do the manual integration in pom.xml and add the Clover goals in the tasks including the save-history, the history folder is generated

inside the build directories target folder which is different from the Automatic Integration where its generated parallel to target as .cloverhistory folder. We do not see the historical charts in Manual integration too. We are not sure if the charts on the plan summary page use a fixed location to get the reports. We tried configuring the location of XML report, but it did not help.

Can you please suggest the ideal way to get the historical charts data when using distributed coverage ?





It would be great if you could share details of your setup (such as screen shots of tasks configured, build log, pom file etc) - feel free to create a ticket at support.atlassian.com. Having information provided by you, I suppose that you shall use manual Clover integration, as your job has multiple tasks and integration tests are in a different task than compilation and packaging. You could try the following setup: 1. Checkout 2. Package - add Clover instrumentation here, e.g. "clover2:clover package" in case of Maven 3. Install/Deploy to remote machine - probably no changes are needed; optionally you may consider copying clover.db instead of keeping it on a shared network drive 4. Run integration tests - when do you compile code for integration tests? in this task or in task #2? 5. Generate Clover reports - e.g. "clover2:clover" in case of Maven; in case you have more than one clover.db you may also need to run "clover2:aggregate" or "clover2:merge" before; in case you want to have historical reports embedded in an HTML report you have to call "clover2:save-history" and use "maven.clover.generateHistorical=true" for "clover2:clover"; check location where HTML and XML reports are written and verify that folders specified in the "Clover XML report" field as well as in the "Clover Report (System)" artifact are correct.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Monday in Confluence

Organizing your space just got easier - Page Tree Drag & Drop is here

Hi Community! I’m Elaine, Confluence Product Manager. You may have read my earlier post about page tree in space navigation sidebar. I'm excited to share another improvement that helps you organize ...

91 views 3 4
Join discussion

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