I am having lots of success using the REST API for the metrics I need to generate except for one key piece. I need to get the CLOVER results from the REST API. However, I cannot find any documentation on this and Google has not been useful at all. At a minimum, we need to get the Total Coverage information. Any help is greatly appreciated.
Hi Timothy,
I assume that you're referring to Bamboo REST API.
Clover publishes several metrics as metadata properties for a build result, named:
CLOVER_BUILD_COVERAGE
CLOVER_LOC
CLOVER_NCLOC
You can fetch these values via build result REST endpoint:
See more details here:
I expanded my build get api result metadata as below and no Clover statistics are shown. How do I get clover stats as a json response ?
<metadata start-index="0" max-result="10" size="10"><item key="buildTimeStamp" value="2020-08-29T12:35:40.400+05:30"/><item key="ManualBuildTriggerReason.userName" value="prash"/><item key="tmp.directory" value="E:\Softwares\bamboo-home\temp"/><item key="bamboo.system.getTestsToPass" value=""/><item key="working.directory" value="E:\Softwares\bamboo-home\xml-data\build-dir\TKLOG-TKLOG-JOB1"/><item key="buildKey" value="TKLOG-TKLOG-JOB1"/><item key="build.working.directory" value="E:\Softwares\bamboo-home\xml-data\build-dir\TKLOG-TKLOG-JOB1"/><item key="hg.cache.directory" value="E:\Softwares\bamboo-home\xml-data\build-dir\_hg-repositories-cache"/><item key="buildNumber" value="3"/><item key="git.cache.directory" value="E:\Softwares\bamboo-home\xml-data\build-dir\_git-repositories-cache"/></metadata>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do you see Clover's statistics in Bamboo UI? Did you build with Clover succeed? Do you see clover.xml coverage file generated by Clover?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I see the clover.xml locally. I have manually configured the plugin for openclover in my pom.xml. I'm not seeing the Clover tab or the Clover metadata in the build log rest API call.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Select the 'I already integrated a code coverage tool in this job' and provide path to your clover.xml file. See https://confluence.atlassian.com/bamboo/enabling-clover-for-bamboo-289277268.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.