• Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • cobertura-plugin
    • None

      I use the cobertura plugin to display the coverage results on some Python code. There are some critical parts of the code where I want to make sure we have 100% coverage. I deliberately don't want 99.7% to mean 100%, because bugs usually happen in those few lines that only execute under very special circumstances.

      Is it possible to render anything between 99% (or 99.5%) and 100% as 99+% (or similar) ? This should apply to all places where a percentage is shown (ie: at the top of the main graph on the job page, in the detailed coverage pages, ...)

       

          [JENKINS-43866] Don't round up 99.x% coverage to 100%

          Jeff Pearce added a comment -

          pjaytycy the easiest thing to do here is to round down everything > 90 and < 100 to 90. In that case you wouldn't be able to tell 90 vs 90+, but that seems OK to me. What do you think?

          Jeff Pearce added a comment - pjaytycy the easiest thing to do here is to round down everything > 90 and < 100 to 90. In that case you wouldn't be able to tell 90 vs 90+, but that seems OK to me. What do you think?

          Thanks for looking into this, but your proposal is worse than the current problem

          I think it would be OK if you round everything between 99% and 100% down to 99%, but certainly don't change 98, 97... to 90%

           

          Pieter-Jan Busschaert added a comment - Thanks for looking into this, but your proposal is worse than the current problem I think it would be OK if you round everything between 99% and 100% down to 99%, but certainly don't change 98, 97... to 90%  

          Jeff Pearce added a comment - - edited

          Sorry - that was a typo. I did indeed mean to type round 99 < pct <= 100 to 99.

          Jeff Pearce added a comment - - edited Sorry - that was a typo. I did indeed mean to type round 99 < pct <= 100 to 99.

          Probably should be 99 <= pct < 100 ?

          (100% should stay 100%)

          Pieter-Jan Busschaert added a comment - Probably should be 99 <= pct < 100 ? (100% should stay 100%)

          Jeff Pearce added a comment -

          Jeff Pearce added a comment -

          Code changed in jenkins
          User: ShenYu Zheng
          Path:
          src/main/java/hudson/plugins/cobertura/Ratio.java
          src/test/java/hudson/plugins/cobertura/RatioTest.java
          http://jenkins-ci.org/commit/cobertura-plugin/c612ade943ca91ea43eb2d07d02607ece8666245
          Log:
          JENKINS-43866 Don't round up 99.x% coverage to 100% (#94)

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: ShenYu Zheng Path: src/main/java/hudson/plugins/cobertura/Ratio.java src/test/java/hudson/plugins/cobertura/RatioTest.java http://jenkins-ci.org/commit/cobertura-plugin/c612ade943ca91ea43eb2d07d02607ece8666245 Log: JENKINS-43866 Don't round up 99.x% coverage to 100% (#94)

          Jeff Pearce added a comment -

          Fixed in release 1.12.1

          Jeff Pearce added a comment - Fixed in release 1.12.1

            cizezsy Shenyu Zheng
            pjaytycy Pieter-Jan Busschaert
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: