Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-7526

Unable to access clover report from Hudson if code coverage not met

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Not A Defect
    • Component/s: clover-plugin
    • Labels:
      None
    • Environment:
      Linux 2.6.32-24-generic #43-Ubuntu SMP Thu Sep 16 14:58:24 UTC 2010 x86_64 GNU/Linux
    • Similar Issues:

      Description

      Basically a chicken and egg problem. Hudson runs build in which all tests pass but the clover coverage is not met.

      This causes the build as a whole to be considered a failure. But the thing is when the build fails, then Hudson does not publish the clover report, even though clover.db is produced. How can I achieve code coverage if Hudson does not publish the clover report. As Homer Simpson would say DOH!.

      An example is shown below:

      Tests run: 16, Failures: 0, Errors: 0, Skipped: 0

      [HUDSON] Recording test results
      [INFO] [clover:check

      {execution: default}

      ]

      [INFO] Checking for coverage of [80%] for database [/var/lib/hudson/jobs/sal-utils/workspace/sal-utils/build/maven/sal-utils/target/clover/clover.db]
      Loaded results from 1 coverage recording.
      [ERROR] Total coverage of 44.9% did not meet target of 80%
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Build failed to meet Clover coverage targets

      [INFO] Publishing Clover coverage report...
      No Clover report will be published due to a Build Failure

        Attachments

          Activity

          Hide
          sogabe sogabe added a comment -

          You should specify "-Dmaven.clover.failOnViolation=false" option for build not to be failed.

          Show
          sogabe sogabe added a comment - You should specify "-Dmaven.clover.failOnViolation=false" option for build not to be failed.

            People

            Assignee:
            stephenconnolly Stephen Connolly
            Reporter:
            ckel ckel
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: