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

Ignore 0/0 Conditional in coverage graph

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      The PHP coverage thingy cannot generate statistics for conditions. The job page shows them correctly as 0/0. The graph, however, shows a 100% coverage line. It should not draw a line for conditional coverage if the total number of conditions is 0.

        Attachments

          Activity

          Show
          sogabe sogabe added a comment - fixed. https://github.com/jenkinsci/clover-plugin/commit/ddbf016c17933cba373903bb797f18172b422509
          Hide
          sebastian_bergmann sebastian_bergmann added a comment -

          The "PHP coverage thingy", which is called PHP_CodeCoverage btw., currently only supports line coverage. This is why its Clover XML reporter sets "conditionals" and "coveredconditionals" to 0. In the near future, Xdebug will provide statement coverage and branch coverage information. This will then be used by PHP_CodeCoverage to set "conditionals" and "coveredconditionals" properly.

          That being said, it seem that the patch mentioned above somehow makes the weather report think that something is wrong with condition coverage. It would be nice if someone could look into this. I will try to reproduce the issue and, if need be, open a separate ticket for this with more detailed information.

          Show
          sebastian_bergmann sebastian_bergmann added a comment - The "PHP coverage thingy", which is called PHP_CodeCoverage btw., currently only supports line coverage. This is why its Clover XML reporter sets "conditionals" and "coveredconditionals" to 0. In the near future, Xdebug will provide statement coverage and branch coverage information. This will then be used by PHP_CodeCoverage to set "conditionals" and "coveredconditionals" properly. That being said, it seem that the patch mentioned above somehow makes the weather report think that something is wrong with condition coverage. It would be nice if someone could look into this. I will try to reproduce the issue and, if need be, open a separate ticket for this with more detailed information.
          Hide
          arzala arzala added a comment - - edited

          @sebastian, this issue works ok from clover plugin point of view. Since conditionals are always 0/0 now, we have to configure "conditionals" in Coverage Metric Targets as "-1" to show correct weather information on project's home page until we have proper values of conditionals in the future.

          Show
          arzala arzala added a comment - - edited @sebastian, this issue works ok from clover plugin point of view. Since conditionals are always 0/0 now, we have to configure "conditionals" in Coverage Metric Targets as "-1" to show correct weather information on project's home page until we have proper values of conditionals in the future.
          Hide
          sebastian_bergmann sebastian_bergmann added a comment -

          http://jenkins-php.org/ now configures "conditionals" in Coverage Metric Targets as "-1" which is a good enough workaround.

          Show
          sebastian_bergmann sebastian_bergmann added a comment - http://jenkins-php.org/ now configures "conditionals" in Coverage Metric Targets as "-1" which is a good enough workaround.
          Hide
          arzala arzala added a comment -

          Yes, but now we do not need this standard Clover plugin, as we have new "Clover php" plugin specially customized for PHP based projects.

          Show
          arzala arzala added a comment - Yes, but now we do not need this standard Clover plugin, as we have new "Clover php" plugin specially customized for PHP based projects.

            People

            • Assignee:
              sogabe sogabe
              Reporter:
              nhb nhb
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: