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

Link to access Clover Coverage Report does not generate correctly

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • clover-plugin
    • None
    • Hudson version 1.349 installed on Windows Server 2003 Standard Edition SP2 machine under Tomcat version 6.0.24. Browser opened on Windows XP Pro Version 2002 SP3 machine using IE 7.0.5730.13.

      When integrating Clover reporting to a job, after the job has successfully built and Clover reports are generated, when clicking on the Job Name link in a view, the Coverage Report link located on the left side of the page (URL example: http://SERVERNAME/view/Testing/job/JOBNAME/clover/) does not contain the build number and therefore when you click the link you get a page with 404 error:
      HTTP Status 404 -
      type Status report
      message
      description The requested resource () is not available.
      Apache Tomcat/6.0.24

      navigating down to the specific build and then to the Clover Coverage Report link gets you to the proper pages.

      The Generate an historical report and Generate a jwon report are checked within the Automatically record and report Clover Coverage in the job configuration. A proper license is entered. As well as the Publish Clover Coverage Report is manually configured correctly.

          [JENKINS-5881] Link to access Clover Coverage Report does not generate correctly

          arzala added a comment -

          In my case we do like this:

          Publish Clover Coverage Report: build
          Clover report file name: clover-coverage.xml (this file is generated by phpunit software during Phing build and stored at above location)

          However we don't use Clover option "Automatically record and report Code Coverage using Clover.. Currently for Ant builds only." because our project is PHP type.

          Let me know if you need more information.

          arzala added a comment - In my case we do like this: Publish Clover Coverage Report: build Clover report file name: clover-coverage.xml (this file is generated by phpunit software during Phing build and stored at above location) However we don't use Clover option "Automatically record and report Code Coverage using Clover.. Currently for Ant builds only." because our project is PHP type. Let me know if you need more information.

          sogabe added a comment -

          In my case:
          I use Phing plugin & xunit plugin.

          my build.xml

          <exec dir="."
                        command="phpunit --log-junit 'reports/unitreport.xml' 
                                         --coverage-html 'reports/coverage'                        
                                         --coverage-clover 'reports/coverage/coverage.xml'
                                         test/*Test.php"
          />
          

          Project settings:
          Clover report directory: phpsample/reports/coverage ( phpsample is module directory of subversion)
          Clover report file name: coverage.xml

          Note:
          Clover plugin searches "Clover report directory" and its immediate children directories for index.html and coverage.xml.

          Check your index.html.

          sogabe added a comment - In my case: I use Phing plugin & xunit plugin. my build.xml <exec dir= "." command="phpunit --log-junit 'reports/unitreport.xml' --coverage-html 'reports/coverage' --coverage-clover 'reports/coverage/coverage.xml' test/*Test.php" /> Project settings: Clover report directory: phpsample/reports/coverage ( phpsample is module directory of subversion) Clover report file name: coverage.xml Note : Clover plugin searches "Clover report directory" and its immediate children directories for index.html and coverage.xml . Check your index.html.

          arzala added a comment - - edited

          Hmm, here you are generating HTML report by phpunit itself, I thought it is generated by Clover plugin from clover coverage file. If I do as you have done, then my problems A and B1 in original comment are solved. But point B2 is still not working. What is solution for them?

          arzala added a comment - - edited Hmm, here you are generating HTML report by phpunit itself, I thought it is generated by Clover plugin from clover coverage file. If I do as you have done, then my problems A and B1 in original comment are solved. But point B2 is still not working. What is solution for them?

          sogabe added a comment -

          @arzala
          Clover plugin does not generate html/pdf report, so you should generate it yourself.
          B2: Are you using PHP 5.3 which supports "name space"?

          sogabe added a comment - @arzala Clover plugin does not generate html/pdf report, so you should generate it yourself. B2: Are you using PHP 5.3 which supports "name space"?

          arzala added a comment -

          @sogabe

          Yes, we use 5.3.5. But what PHP has to do with B2 issue? I feel that http://issues.jenkins-ci.org/browse/JENKINS-6496 is related to this. So it seems some css/rendering issue. However I am just guessing from my experience.

          arzala added a comment - @sogabe Yes, we use 5.3.5. But what PHP has to do with B2 issue? I feel that http://issues.jenkins-ci.org/browse/JENKINS-6496 is related to this. So it seems some css/rendering issue. However I am just guessing from my experience.

          arzala added a comment - - edited

          @sogabe, what is status of this my B2 problem? You can check 2nd screen shot. Any work around or work in progress on your side?

          arzala added a comment - - edited @sogabe, what is status of this my B2 problem? You can check 2nd screen shot. Any work around or work in progress on your side?

          sogabe added a comment -

          @arzala sorry for late relpy.

          The plugin tries to display package names with html link on "Coverage Breakdown by Package". but it can't display package name. because the coverage.xml which is generated by PHPUnit has no information about package.

          coverage.xml by PHPUnit. no package information.

          <?xml version="1.0" encoding="UTF-8"?>
          <coverage generated="1300333562" phpunit="3.4.13">
            <project name="StringUtilTest" timestamp="1300333562">
              <file name="/var/lib/hudson/jobs/php-sample/workspace/phpsample/src/StringUtil.php">
                <class name="StringUtil" namespace="global">
                  <metrics methods="2" coveredmethods="1" statements="2" coveredstatements="1" elements="4" coveredelements="2"/>
                </class&gt;
          

          coverage.xml by clover. which has package information.

          <?xml version="1.0" encoding="UTF-8"?>
          <coverage generated="1301416984387" clover="3.0.2">
             <project timestamp="1301416979288" name="struts-jquery 1.0-SNAPSHOT">
                <metrics conditionals="16" methods="13" classes="5" files="5" packages="3" coveredstatements="17" complexity="29" loc="300" ncloc="160" coveredmethods="1" coveredconditionals="4" statements="63" coveredelements="22" elements="92"/>
                <package name="jp.ddo.bacons.jquery.http.filter">  <!-- here
                   <metrics conditionals="10" methods="4" classes="1" files="1" coveredstatements="0" complexity="12" loc="134" 
                                 ncloc="60" coveredmethods="0" coveredconditionals="0" statements="19" coveredelements="0" elements="33"/>
                   <file name="EncodingFilter.java" path="/var/lib/hudson/jobs/struts-jquery-freestyle/workspace/src/main/java/jp/ddo/bacons/jquery/http/filter/EncodingFilter.java">
                      <metrics classes="1" methods="4" conditionals="10" ncloc="60" coveredstatements="0" coveredmethods="0" complexity="12" coveredconditionals="0" statements="19" loc="134" coveredelements="0" elements="33"/>
                      <class name="EncodingFilter">
          

          sogabe added a comment - @arzala sorry for late relpy. The plugin tries to display package names with html link on "Coverage Breakdown by Package". but it can't display package name . because the coverage.xml which is generated by PHPUnit has no information about package. coverage.xml by PHPUnit. no package information. <?xml version= "1.0" encoding= "UTF-8" ?> <coverage generated= "1300333562" phpunit= "3.4.13" > <project name= "StringUtilTest" timestamp= "1300333562" > <file name= "/ var /lib/hudson/jobs/php-sample/workspace/phpsample/src/StringUtil.php" > < class name= "StringUtil" namespace= "global" > <metrics methods= "2" coveredmethods= "1" statements= "2" coveredstatements= "1" elements= "4" coveredelements= "2" /> </ class& gt; coverage.xml by clover. which has package information. <?xml version= "1.0" encoding= "UTF-8" ?> <coverage generated= "1301416984387" clover= "3.0.2" > <project timestamp= "1301416979288" name= "struts-jquery 1.0-SNAPSHOT" > <metrics conditionals= "16" methods= "13" classes= "5" files= "5" packages= "3" coveredstatements= "17" complexity= "29" loc= "300" ncloc= "160" coveredmethods= "1" coveredconditionals= "4" statements= "63" coveredelements= "22" elements= "92" /> < package name= "jp.ddo.bacons.jquery.http.filter" > <!-- here <metrics conditionals= "10" methods= "4" classes= "1" files= "1" coveredstatements= "0" complexity= "12" loc= "134" ncloc= "60" coveredmethods= "0" coveredconditionals= "0" statements= "19" coveredelements= "0" elements= "33" /> <file name= "EncodingFilter.java" path= "/ var /lib/hudson/jobs/struts-jquery-freestyle/workspace/src/main/java/jp/ddo/bacons/jquery/http/filter/EncodingFilter.java" > <metrics classes= "1" methods= "4" conditionals= "10" ncloc= "60" coveredstatements= "0" coveredmethods= "0" complexity= "12" coveredconditionals= "0" statements= "19" loc= "134" coveredelements= "0" elements= "33" /> < class name= "EncodingFilter" >

          sogabe added a comment -

          @arzala

          I've just release clover PHP Plugin. https://wiki.jenkins-ci.org/display/JENKINS/Clover+PHP+Plugin.
          It supports only PHP.

          sogabe added a comment - @arzala I've just release clover PHP Plugin. https://wiki.jenkins-ci.org/display/JENKINS/Clover+PHP+Plugin . It supports only PHP.

          arzala added a comment -

          Thanks, will use it and give you feedback.

          arzala added a comment - Thanks, will use it and give you feedback.

          arzala added a comment -

          This is proper solution for PHP based projects. Thanks for this plugin. It works nicely as per PHP related project's requirements. Please resolve this task.

          arzala added a comment - This is proper solution for PHP based projects. Thanks for this plugin. It works nicely as per PHP related project's requirements. Please resolve this task.

            sogabe sogabe
            jburrows John Burrows
            Votes:
            5 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: