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

Convert git client plugin tests from JUnit 3 to JUnit 4

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      The git client plugin tests have started their transition process to retire the JUnit 3 based GitAPITestCase, CliGitAPIImplTest, and JGitAPIImplTest. They should be replaced by the parameterized GitClientTest.

      For each test in GitAPITestCase, CliGitAPIImplTest, and JGitAPIImplTest:

      • If it is already tested in GitClientTest, delete the test from the JUnit 3 based tests
      • If it is not already tested in GitClientTest, write a test in GitClientTest or in a new test class and delete the test from the JUnit 3 based tests

      This issue could be worked by multiple people concurrently, so long as they coordinate with one another on the specific tests they are converting.

        Attachments

          Activity

          Hide
          markewaite Mark Waite added a comment -

          Ayan the issue is definitely still open for work. Would love to have help from others to migrate those tests from JUnit 3 to JUnit 4.

          Show
          markewaite Mark Waite added a comment - Ayan the issue is definitely still open for work. Would love to have help from others to migrate those tests from JUnit 3 to JUnit 4.
          Hide
          ayang17 Ayan added a comment -

          Thanks Mark Waite I'm right now going through the classes as mentioned in the previous discussion, could suggest anything for a beginner?

          Show
          ayang17 Ayan added a comment - Thanks Mark Waite  I'm right now going through the classes as mentioned in the previous discussion, could suggest anything for a beginner?
          Hide
          markewaite Mark Waite added a comment -

          Ayan choose any of the methods in GitAPITestCase that are public void test_.*. Fewer statements in the test method will make that method easier to convert to JUnit 4. For example, you might consider:

          • test_getRemoteURL
          • test_empty_comment
          • test_create_branch
          • test_delete_branch
          • test_delete_tag
          • test_list_tags_with_filter
            test_list_tags_without_filter
          Show
          markewaite Mark Waite added a comment - Ayan choose any of the methods in GitAPITestCase that are public void test_.* . Fewer statements in the test method will make that method easier to convert to JUnit 4. For example, you might consider: test_getRemoteURL test_empty_comment test_create_branch test_delete_branch test_delete_tag test_list_tags_with_filter test_list_tags_without_filter
          Hide
          ayang17 Ayan added a comment -

          Sure, thanks Mark Waite

          Show
          ayang17 Ayan added a comment - Sure, thanks Mark Waite
          Hide
          ayang17 Ayan added a comment -

          Mark Waite I implemeted the test_getRemoteURL, wanted your review about the same that my approach is okay or there is some area where I can improve, so I have created a PR, please review it.

          Show
          ayang17 Ayan added a comment - Mark Waite  I implemeted the test_getRemoteURL, wanted your review about the same that my approach is okay or there is some area where I can improve, so I have created a PR, please review it.

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            markewaite Mark Waite
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated: