I configured bamboo and started using it to perform different project builds.
Our project manager want a way to track code churn and the number of lines of code for each build.
Would Clover be used to provide code coverage and report the lines of code changed for each build?
I downloaded a Clover trial license, but it seem that it supports :
Clover for IDEA - 3.1.6
Clover for Eclips - 3.1.6
Clover for Ant - 3.1.6
Cover for Maven 1
But we do not use any of these systems. We use legacy build systems such as Make and other custom build scripts to build our projects.
Can we use Clover to provides with code coverage?
In order to use Clover with Bamboo and a legacy build system (e.g. make), you have to:
1) Instrument sources and compile them
Call the https://confluence.atlassian.com/display/CLOVER/CloverInstr command line tool from your makefile and put instrumented files into some temporary directory. Modify your javac command so that it will use instrumented sources instead of the original ones.
2) Get coverage data
Run your unit tests (or any other kind of test you have in your build). Coverage files will be written to the same directory where clover.db is stored (which is defined in point 1).
3) Generate Clover XML report
Use the https://confluence.atlassian.com/display/CLOVER/XmlReporter command line tool for this task. Store report in a directory accessible by Bamboo build.
These three tasks above can be done by make called from Bamboo task. Now you have to tell Bamboo where the XML report is located:
4) Integrate Clover with Bamboo
Open Job configuration. Find "Miscellanous" tab. On this tab, enable the "Use Clover to collect Code Coverage for this build" checkbox. For "Integration Options" choose "Clover is already integrated into this build and a clover.xml file will be produced" option. In the "Clover XML Location" edit field enter a path to your clover.xml report file (generated in point 3).
Now you should see the "Clover" tab on the Plan Summary page (two graphs) and the Build Summary page (last build statistics).
The CloverInstr and XmlReporter command line tools are available in clover.jar in Clover-for-Ant.
Happy New Year! We hope you all had a safe and restful holiday season. 2020 was a unique year full of unforeseen events; however, as we enter the new year of 2021, we’re optimistic for the light at t...
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