This documentation relates to an earlier version of Bamboo.
View

Unknown macro: {spacejump}

or visit the current documentation home.

This page contains instructions on enabling and configuring the Clover plugin for a Job of a Plan in Bamboo.

On this page:

Enabling the 'Clover' Plugin on a Plan

To enable the 'Clover' plugin on a plan:

  1. Navigate to the desired Job, as described on Configuring a Job.
  2. Click the 'Configuration' tab.
  3. Click the 'Configure Job' dropdown, then click 'Builder'. You will need Administrator rights to do this.
  4. Tick the option 'Use Clover to collect Code Coverage for this build' and fill out the following fields;
    • 'Integration Options' — Select one of the following options:
      • 'Automatically integrate Clover into this build' — For this option, you have two sub options; 'Generate a Clover Historical Report' and 'Generate a JSON report'. The Clover Historical Report shows the current coverage results compared with previous Clover code coverage reports. The JSON report gives the Clover results in a format ready for embedding into applications or external report views.
        You will also need to insert a Clover license (evaluation licenses are available) into the field provided.
      • 'Clover is already integrated into this build and a clover.xml file will be produced' — Use this option when you already have Clover-for-Ant or Clover-for-Maven configured to generate a report. You will also need to specify where the Clover XML report is being generated, under 'Clover XML Location'. For this, specify the name of the directory (including path) where Bamboo will look for the XML report output file from Clover. Please specify a file path relative to your plan's root directory, for example:
         target/site/clover/clover.xml 
        (info) Do not specify an absolute path.
    • 'Clover XML Location' — Specify the location where Bamboo will look for the XML report output file from Clover. Please specify file path relative to your plan's root directory (e.g /home/bamboouser/bamboo-home/xml-data/build-dir/MY_PLAN/), i.e. please do not specify an absolute path.
  5. Click the 'Save' button.


Screenshot above: Enabling Clover on your Plan


Screenshot above: Pointing Bamboo to existing Clover reports

Notes

Related Topics

13 Comments

  1. Anonymous

    When I choose "Automatically integrate Clover..."  and my Maven2 goals are just clean and test   (ie mvn clean test)   bamboo decides that instead it will run (clean test clean clover2:setup verify)

    And the problem is that my build server is currently behind a firewall, and is not available for our selenium server to access, so "verify" will always hang.  But I dont want verify to run!

    How can I integrate clover, but not have Bamboo decide it will run Verify  anyway???

    1. Anonymous

      Just disable automatic clover integration and add the appropriate goals to your Maven task command line.  For example, add "clean clover2:setup test".

  2. Anonymous

    'Clover XML Location' — Specify the location where Bamboo will look for the XML report output file from Clover. Please specify file path relative to your plan's root directory (e.g /home/bamboouser/bamboo-home/xml-data/build-dir/MY_PLAN/), i.e. please do not specify an absolute path.

    That example is an absolute path.

  3. Anonymous

    This doesn't seem to line up with Bamboo 3.3 at all.  There is no Configuration tab once on the plan configuration page..

    1. Anonymous

      It's now located on any "job" configuration > miscellaneous

      Navigate from plan > stages > default stage > default job

  4. Jim Bethancourt

    Is the Clover plugin / integration available for Atlassian OnDemand?

     

    Thanks,

    Jim

  5. dushan abeyruwan

    Hi I enabled clover coverage but I CAN NOT  see detail dashbord getting exported to the clover coverage it has view just few details like Test Coverage/ Build Statistics getting displyed,(I found out that detail dashboard details are at target/site/clover/***) 

    how can I enable my plan to export this dashboard...(I have tried "clover is already integrated ......" option) ? why this is soo buggy

    1. Greg Arakelian

      I'm having the same problem.  Did you ever resolve this?

    2. Roby

      I have the same issue, as well.  I can see the Clover Code Coverage panel with text detailing Test Coverage and Build Statistics.  However, we cannot see the Clover-generated Clover Coverage Report that is accessible from index.html.

  6. Kenny Ayers

    In 3.4, how do I specify for Clover to parse results if I'm using a custom command line to build?  It only appears for other options, like Ant.

    We're doing a product evaluation on this now, and this is miserably frustrating.

  7. gopi

    i did selected option "Automatically integrate Clover into this build." but I don't see any code coverage report generating. (Bamboo version 3.4.3)

    Always getting error as  "Failed to execute plugin 'Clover Results Collector' with error: No file matches the specified pattern:target/site/clover/**/clover.xml".

    I have used artifact copy pattern as "**/target/site/clover/*.xml" and i see clover.xml artifact copying to bamboo server. Am i missing any thing? tried all possible copy patterns on artifact configurations. appreciate your inputs.

    Maven Command configured on my task:  "clean clover2:instrument test clover2:aggregate clover2:clover -P cloverCoverage",   however bamboo is executing command as
    "mvn -Djava.io.tmpdir=/tmp/COVERAGE-REGCODECOVER-JOB1 clean clover2:instrument test clover2:aggregate clover2:clover -P cloverCoverage clean com.atlassian.maven.plugins::maven-clover2-plugin:setup verify com.atlassian.maven.plugins::maven-clover2-plugin:aggregate com.atlassian.maven.plugins::maven-clover2-plugin:clover -Dmaven.clover.generateJson=false -Dmaven.clover.licenseLocation=/home/gopigadu/p4Workspace/p4-dol/DiamondReg/trunk/diamond-service/.clover/clover.license"
     
    BAMBOO BUILD EXECTUION LOG:
    16-Feb-2012 23:15:26  Parsing test results...
    16-Feb-2012 23:15:33  Finished task 'Maven 2.x'
    16-Feb-2012 23:15:33  Running post build plugin 'Artifact Copier'
    16-Feb-2012 23:15:33  Publishing an artifact: Diamond War
    16-Feb-2012 23:15:53  Finished publishing of artifact Job artifact: [Diamond War], pattern: [**/*.war] in 19s
    16-Feb-2012 23:15:53  Publishing an artifact: Clover Report (System)
    16-Feb-2012 23:16:13  Finished publishing of artifact Job artifact: [Clover Report (System)], pattern: [**/target/site/clover/*.xml] in 20s
    16-Feb-2012 23:16:13  Running post build plugin 'NCover Results Collector'
    16-Feb-2012 23:16:13  Running post build plugin 'Artifactory Release Management Staging'
    16-Feb-2012 23:16:13  Running post build plugin 'Artifactory Build Info Copier'
    16-Feb-2012 23:16:13  Running post build plugin 'Artifactory Gradle Properties Info Copier'
    16-Feb-2012 23:16:13  Running post build plugin 'Clover Results Collector'
    16-Feb-2012 23:16:13  Failed to execute plugin 'Clover Results Collector' with error: No file matches the specified pattern:target/site/clover/**/clover.xml
    16-Feb-2012 23:16:13  Running post build plugin 'Cleanup Build Processor'
    16-Feb-2012 23:16:13  Finalising the build...
    16-Feb-2012 23:16:13  Stopping timer.
    16-Feb-2012 23:16:13  Build COVERAGE-REGCODECOVER-JOB1-40 completed.
    16-Feb-2012 23:15:01  Running on server: post build plugin 'NCover Results Collector'
    16-Feb-2012 23:15:01  Running on server: post build plugin 'Clover Delta Calculator'
    16-Feb-2012 23:15:01  Running on server: post build plugin 'Build Hanging Detection Configuration'
    16-Feb-2012 23:15:01  Running on server: post build plugin 'Maven Dependencies Postprocessor'
    16-Feb-2012 23:15:01  All post build plugins have finished
    16-Feb-2012 23:15:01  Generating build results summary...
    16-Feb-2012 23:15:01  Saving build results to disk...
    16-Feb-2012 23:15:02  Indexing build results...
    16-Feb-2012 23:15:02  Finished building COVERAGE-REGCODECOVER-JOB1-40.  

     

    1. Jason Huntley

      I'm also experiencing issues using clover with bamboo 3.4.3 build 2811. I selected Integration Options:

      A
      However, the clover directory created is empty and no clover.xml results get generated. I encounter the following exception:
      21-Feb-2012 11:06:16Running post build plugin 'NCover Results Collector'
      21-Feb-2012 11:06:16Running post build plugin 'Clover Results Collector'
      21-Feb-2012 11:06:16Failed to execute plugin 'Clover Results Collector' with error: No file matches the specified pattern:clover\**\clover.xml

       

      1. gopi

        Do you see 'clover' tab after build completed? also could you please confirm your configs steps to integrate clover with bamboo?

        Below are my config steps and i don't see 'clvoer' tab on my build completion activity.

        1) Add maven plug-in in pom.xml

              <groupId>com.atlassian.maven.plugins</groupId>
              <artifactId>maven-clover2-plugin</artifactId>
              <version>3.1.3</version>

        2) Selected "A