What should be tested here?

      For the HealthReportBuilder a test class already exists. In this test class, the method 

      computeHealth(final int counter, final AnnotationProvider result)
      

      is tested with 100% coverage. It computes the healthiness of a build based on the specified counter.

       

      The aim of this task is to test the whole functionallity of the builder, which includes the method 

      computeHealth(final AnnotationProvider result)

      It computes the healthiness of a build based on the specified result.

          [JENKINS-50066] Unit Test for HealthReportBuilder

          Ulli Hafner created issue -
          Ulli Hafner made changes -
          Epic Link New: JENKINS-50065 [ 189073 ]
          Ulli Hafner made changes -
          Rank New: Ranked lower
          Ulli Hafner made changes -
          Rank New: Ranked higher
          Michaela Reitschuster made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Alexandra Wenzel made changes -
          Assignee Original: Ulli Hafner [ drulli ] New: Alexandra Wenzel [ loelala ]
          Alexandra Wenzel made changes -
          Description New: *What should be tested here? __* 

          For the HealthReportBuilder a test class already exists. In this test class, the method 
          {code:java}
          computeHealth(final int counter, final AnnotationProvider result)
          {code}
          is tested with 100% coverage. The aim of this task is to test the whole functionallity of the builder, which includes the method 
          {code:java}
          computeHealth(final AnnotationProvider result)
          {code}
          Alexandra Wenzel made changes -
          Description Original: *What should be tested here? __* 

          For the HealthReportBuilder a test class already exists. In this test class, the method 
          {code:java}
          computeHealth(final int counter, final AnnotationProvider result)
          {code}
          is tested with 100% coverage. The aim of this task is to test the whole functionallity of the builder, which includes the method 
          {code:java}
          computeHealth(final AnnotationProvider result)
          {code}
          New: *What should be tested here?*

          For the HealthReportBuilder a test class already exists. In this test class, the method 
          {code:java}
          computeHealth(final int counter, final AnnotationProvider result)
          {code}
          is tested with 100% coverage. The aim of this task is to test the whole functionallity of the builder, which includes the method 
          {code:java}
          computeHealth(final AnnotationProvider result)
          {code}
          Ulli Hafner made changes -
          Description Original: *What should be tested here?*

          For the HealthReportBuilder a test class already exists. In this test class, the method 
          {code:java}
          computeHealth(final int counter, final AnnotationProvider result)
          {code}
          is tested with 100% coverage. The aim of this task is to test the whole functionallity of the builder, which includes the method 
          {code:java}
          computeHealth(final AnnotationProvider result)
          {code}
          New: SUT is {{io.jenkins.plugins.analysis.core.quality.HealthReportBuilder}}. The deprecated class {{hudson.plugins.analysis.core.HealthReportBuilder}} and the associated test should not be touched.

          I also updated the branch so that this test does not require Mockito, i.e. now the method  
          {code:java}
          public HealthReport computeHealth(final AnalysisResult result)
          {code}
          should be tested.
          Ulli Hafner made changes -
          Description Original: SUT is {{io.jenkins.plugins.analysis.core.quality.HealthReportBuilder}}. The deprecated class {{hudson.plugins.analysis.core.HealthReportBuilder}} and the associated test should not be touched.

          I also updated the branch so that this test does not require Mockito, i.e. now the method  
          {code:java}
          public HealthReport computeHealth(final AnalysisResult result)
          {code}
          should be tested.
          New: SUT is {{io.jenkins.plugins.analysis.core.quality.HealthReportBuilder}}. The deprecated class {{hudson.plugins.analysis.core.HealthReportBuilder}} and the associated test should not be touched.

          I also [updated the branch |https://github.com/jenkinsci/analysis-core-plugin/commit/85f967253db5521b766f303a294a35ead8772230] so that this test does not require Mockito, i.e. now the method  
          {code:java}
          public HealthReport computeHealth(final AnalysisResult result)
          {code}
          should be tested.
          Ulli Hafner made changes -
          Description Original: SUT is {{io.jenkins.plugins.analysis.core.quality.HealthReportBuilder}}. The deprecated class {{hudson.plugins.analysis.core.HealthReportBuilder}} and the associated test should not be touched.

          I also [updated the branch |https://github.com/jenkinsci/analysis-core-plugin/commit/85f967253db5521b766f303a294a35ead8772230] so that this test does not require Mockito, i.e. now the method  
          {code:java}
          public HealthReport computeHealth(final AnalysisResult result)
          {code}
          should be tested.
          New: SUT is {{io.jenkins.plugins.analysis.core.quality.HealthReportBuilder}}. The deprecated class {{hudson.plugins.analysis.core.HealthReportBuilder}} and the associated test should not be touched.

          I also [updated the branch |https://github.com/jenkinsci/analysis-core-plugin/commit/85f967253db5521b766f303a294a35ead8772230] so that this test does not require Mockito, i.e. now the method  
          {code:java}
          public HealthReport computeHealth(final AnalysisResult result)
          {code}
          should be tested.

          You can reuse (i.e. copy) some portions of the old test if that makes sense.

            loelala Alexandra Wenzel
            drulli Ulli Hafner
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: