It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to clover html-report embed in bamboo

While it's easy enough to get clover to generate a detailed html-report (looks great by the way) via ant getting that same report displayed in bamboo is another story. All of the documentation online, as well as bamboo and clover plugin itself, say to generate an xml-report. However doing so and pointing to it is generating a very simple almost "summary" like report. I want bamboo to display and/or generate the html report that clover can easily generate in ant. Is this possible? Do I have to generate html-report in ant and collect the data as an artifact?

2 answers

1 accepted

1 vote
Answer accepted

If Bamboo Clover Plugin (no matter whether it's Bamboo 3.x or 4.x) finds HTML Report (*) artifact after build, then content of the "Job Summary" > "Clover" tab shows HTML report (as on Viewing+the+Clover+code-coverage+for+a+build).

If HTML Report artifact is not present, then Bamboo Clover Plugin searches for XML Report (clover.xml file). If found, the content of "Job Summary" > "Clover" shows basic report (as on 3.5+Viewing+Clover+Code-Coverage+for+a+Build+Result).

If XML Report is not available, then "Clover" tab is not visible.

Please note that there is no difference whether automatic or manual Clover integration is used.

(*) This artifact is by default named "Clover Report (System)", but it doesn't have to, because Clover plugin is using some simple heuristics and checks artifact content in order to determine whether it's an HTML report or not.


Ok this does work but takes a REALLY long time to generate the html report from the xml. If I generate the report, AOT via html-report task, then I get it instantly through the artifacts tab. Is there anyway to speed up the generation through bamboo (i.e. more memory/threads) or do you recommend doing it AOT via html-report ant task?

Gettig this to work correctly I had to have clover generate an xml report as well as an html-report. I had to turn clover on for specific job and point it at the xml report. I then had to create an artifact and point that at the generated html-report. This works as expected but seems a bit wonky. Is there something I'm missing?

Just to clarify: HTML report is not being generated from XML report; as a matter of fact, both reports are being generated using information from Clover database (clover.db) and coverage recordings (clover.dbHHHHHHH_TTTTTTTTTT). Bamboo does not create HTML report on its own (if you have automatic integration) - it just calls proper Clover tasks (Ant-based projects) or goals (Maven-based projects).

You've mentioned that report generation using <html-report/> task in Ant script is significantly faster than generating the same report using automatic Clover integration - am I correct? In such case it can be caused by different settings used in your Ant build.xml file compared to default Bamboo Clover Plugin settings.

Please also note that significantly longer build time can be actually caused by different targets executed during build (and not just html report generation). If you use automatic integration then full clean is made, for example.

Things you could check: does these two (from manual and automatic integration) HTML reports are identical (coverage values; number of tests executed; can you click on a left margin of a source line and see per-test coverage; etc)? do you generate also historical or JSON reports using automatic integration? compare build logs from manual and automatic integration - do you see the same list of targets being executed?

0 votes

If you define the report as an artifact (I vaguely remember it gets defined automatically?), like this:

Clover HTML build/clover/ **/*.*

You will be able to access the HTML report from the artifacts tab via your web browser.

Do you have an artifact called "Clover Report (System)" in your build?

Not exactly named that but yes. Having ant generate the html-report and viewing it through an artifact is working as expected. I think the issues may be bamboo verisons. We are currently using bamboo 3.4 and see output like the following:

However bamboo 4.x displays the output like so:

Am I correct in assuming that bamboo 4.x will generate the html-report for me?

It's Clover that generates the report. Bamboo should automatically hook it up (create the artifact etc.) - not sure about 3.4, but 4 definitely does it.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Trello

The control freak's guide: using Trello to plan a relocation

My partner and I were planning this relocation for years. It was our shared dream to try and live in another country. As children of immigrants, we already have experienced this once, but this still ...

212 views 6 11
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you