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

Improve node label parameter plugin automated test coverage

      Increase automated test coverage

      Automated test coverage of the node and label parameter plugin is lower that is desired. Improve the automated test coverage by submitting pull requests with new automated tests.

      Review current coverage

      Review the current test coverage with the commands:

      Linux

      $ mvn -P enable-jacoco clean install jacoco:report
      $ xdg-open target/site/jacoco/index.html
      

      Windows

      C:\Users\Yourname > mvn -P enable-jacoco clean install jacoco:report
      C:\Users\Yourname > start target\site\jacoco\index.html
      

      More information is in the "code coverage" section of the contributing guide.

      Create a new test for a class that is not well covered

      Most integrated development environments have tools that will create a test stub that is a good beginning. Apache Netbeans has "Create / Update tests" . JetBrains IntelliJ has "Create tests". Visual Studio Code has the "Extension Pack for Java".

      Use the IDE or your own coding to create a test for one of the classes that is not well covered by tests.

      Keep the test small so that the pull request is easy to review.

          [JENKINS-69756] Improve node label parameter plugin automated test coverage

          Mark Waite created issue -
          Mark Waite made changes -
          Assignee Original: Mark Waite [ markewaite ]
          Mark Waite made changes -
          Summary Original: Improve automated test coverage of node label parameter plugin New: Improve node label parameter plugin automated test coverage
          Mark Waite made changes -
          Description Original: h2. Increase automated test coverage

          Automated test coverage of the node and label parameter plugin is lower that is desired. Improve the automated test coverage by submitting pull requests with new automated tests.
          h2. Review current coverage

          Review the [current test coverage|https://ci.jenkins.io/job/Plugins/job/nodelabelparameter-plugin/job/master/lastSuccessfulBuild/coverage/] with the commands:
          h3. Linux
          {noformat}
          $ mvn -P enable-jacoco clean install jacoco:report
          $ xdg-open target/site/jacoco/index.html
          {noformat}
          h3. Windows
          {noformat}
          C:\Users\Yourname > mvn -P enable-jacoco clean install jacoco:report
          C:\Users\Yourname > start target\site\jacoco\index.html
          {noformat}
          More information is in the ["code coverage" section|https://github.com/jenkinsci/nodelabelparameter-plugin/blob/master/CONTRIBUTING.md#code-coverage] of the [contributing guide|https://github.com/jenkinsci/nodelabelparameter-plugin/blob/master/CONTRIBUTING.md].
          h2. Create a new test for a class that is not well covered

          Most integrated development environments have tools that will create a test stub that is a good beginning. Apache Netbeans has ["Create / Update tests"|https://netbeans.apache.org/kb/docs/java/junit-intro.html] . JetBrains IntelliJ has ["Create tests"|https://www.jetbrains.com/help/idea/create-tests.html]. Visual Studio Code has the ["Extension Pack for Java"|https://code.visualstudio.com/docs/java/java-testing].

          Use the IDE or your own coding to create a test for one of the classes that is not well covered by tests.

          Keep the test small so that the pull request is easy to review.I
          New: h2. Increase automated test coverage

          Automated test coverage of the node and label parameter plugin is lower that is desired. Improve the automated test coverage by submitting pull requests with new automated tests.
          h2. Review current coverage

          Review the [current test coverage|https://ci.jenkins.io/job/Plugins/job/nodelabelparameter-plugin/job/master/lastSuccessfulBuild/coverage/] with the commands:
          h3. Linux
          {noformat}
          $ mvn -P enable-jacoco clean install jacoco:report
          $ xdg-open target/site/jacoco/index.html
          {noformat}
          h3. Windows
          {noformat}
          C:\Users\Yourname > mvn -P enable-jacoco clean install jacoco:report
          C:\Users\Yourname > start target\site\jacoco\index.html
          {noformat}
          More information is in the ["code coverage" section|https://github.com/jenkinsci/nodelabelparameter-plugin/blob/master/CONTRIBUTING.md#code-coverage] of the [contributing guide|https://github.com/jenkinsci/nodelabelparameter-plugin/blob/master/CONTRIBUTING.md].
          h2. Create a new test for a class that is not well covered

          Most integrated development environments have tools that will create a test stub that is a good beginning. Apache Netbeans has ["Create / Update tests"|https://netbeans.apache.org/kb/docs/java/junit-intro.html] . JetBrains IntelliJ has ["Create tests"|https://www.jetbrains.com/help/idea/create-tests.html]. Visual Studio Code has the ["Extension Pack for Java"|https://code.visualstudio.com/docs/java/java-testing].

          Use the IDE or your own coding to create a test for one of the classes that is not well covered by tests.

          Keep the test small so that the pull request is easy to review.

          shamly mhd added a comment -

          Hi markewaite can I start to work on this issue?

          shamly mhd added a comment - Hi markewaite can I start to work on this issue?

          Mark Waite added a comment -

          Yes, absolutely. Checkout the code, prepare a small commit, and submit it to the repository.

          Mark Waite added a comment - Yes, absolutely. Checkout the code, prepare a small commit, and submit it to the repository.
          shamly mhd made changes -
          Assignee New: shamly mhd [ shamly ]

          Udit added a comment -

          Hi shamly 
          Are you still working on this?
          If you currently don't have time for this issue, I can start working on this

          Udit added a comment - Hi shamly   Are you still working on this? If you currently don't have time for this issue, I can start working on this
          Mark Waite made changes -
          Assignee Original: shamly mhd [ shamly ]

          Mark Waite added a comment -

          udit_damare I've removed the assignment of shamly  since there has been no progress on it since shamly  self-assigned it several months ago.

          I've found that assigning a beginner friendly issue to someone is rarely successful.  Interest is expressed, but then there is no further progress.  Others see that it is assigned and hesitate to help.  This specific issue has many, many ways that multiple contributors can help.  The red classes shown in the coverage report (lines and classes tabs) all would benefit from more automated tests.

          Mark Waite added a comment - udit_damare I've removed the assignment of shamly   since there has been no progress on it since shamly   self-assigned it several months ago. I've found that assigning a beginner friendly issue to someone is rarely successful.  Interest is expressed, but then there is no further progress.  Others see that it is assigned and hesitate to help.  This specific issue has many, many ways that multiple contributors can help.  The red classes shown in the coverage report (lines and classes tabs) all would benefit from more automated tests.

            Unassigned Unassigned
            markewaite Mark Waite
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: