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.
Atlassian Summit is an excellent opportunity for in-person support, training, and networking.Learn more
...there's anything I've learnt from working, it's that people are lazy! No offense to anyone reading this, but it's true and we can all admit it. The easier you make something for someone, the more...
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!
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