Uploaded image for project: 'IGB'
  1. IGB
  2. IGBF-1981

Investigate and fix test errors in BookMarkTest.java (BookMark Plugin)

    Details

    • Story Points:
      1
    • Sprint:
      Fall 2019 Sprint 2, Fall 2019 Sprint 3, Fall 4 : 30 Sep to 11 Oct, Fall 5 : 14 Oct to 25 Oct, Fall 6 : 28 Oct to 8 Nov

      Description

      BookMark project is compiling successfully but shows errors in the NetBeans editor.
      Tried to add necessary dependencies to pom.xml but it still shows errors in Netbeans editor.

        Attachments

          Issue Links

            Activity

            Hide
            ann.loraine Ann Loraine added a comment -

            Please provide steps on how to reproduce this. Also please describe what the bug looks like – maybe a stack trace?

            Show
            ann.loraine Ann Loraine added a comment - Please provide steps on how to reproduce this. Also please describe what the bug looks like – maybe a stack trace?
            Hide
            svallapu Sai Charan Reddy Vallapureddy (Inactive) added a comment -

            [~aloraine]
            To reproduce
            go to below file location (I have tested this in Netbeans)
            plugins/Bookmark/src/test/com/affymetrix/igb/bookmarks/BookMarkTest.java

            When I opened the file, it shows errors in the IDE but it builds without any issues. (Maybe a dependency problem or IDE?)

            I have attached a screenshot of BookMarkTest.java for reference.

            Show
            svallapu Sai Charan Reddy Vallapureddy (Inactive) added a comment - [~aloraine] To reproduce go to below file location (I have tested this in Netbeans) plugins/Bookmark/src/test/com/affymetrix/igb/bookmarks/BookMarkTest.java When I opened the file, it shows errors in the IDE but it builds without any issues. (Maybe a dependency problem or IDE?) I have attached a screenshot of BookMarkTest.java for reference.
            Hide
            shamika Shamika Gajanan Kulkarni (Inactive) added a comment - - edited

            I think that IGB builds without any issues maybe because BookMarkTest.java is a Test class. Kindly correct me if I am wrong.
            I found out that the plugin for "junit" was missing in the pom.xml for Bookmark and I have added the plugin and also an import statement. Now it shows no errors on my IDE. I am attaching a screenshot for the same. The code changes are present in the link below. Kindly review.
            https://bitbucket.org/skulka2710/shamika_igb/branch/IGBF-1981#diff

            Show
            shamika Shamika Gajanan Kulkarni (Inactive) added a comment - - edited I think that IGB builds without any issues maybe because BookMarkTest.java is a Test class. Kindly correct me if I am wrong. I found out that the plugin for "junit" was missing in the pom.xml for Bookmark and I have added the plugin and also an import statement. Now it shows no errors on my IDE. I am attaching a screenshot for the same. The code changes are present in the link below. Kindly review. https://bitbucket.org/skulka2710/shamika_igb/branch/IGBF-1981#diff
            Hide
            ann.loraine Ann Loraine added a comment -

            Follow-up question for Shamika Gajanan Kulkarni:

            • Does the test execute during the build?

            (I think it will, based on your changes, but we should check.)

            Show
            ann.loraine Ann Loraine added a comment - Follow-up question for Shamika Gajanan Kulkarni : Does the test execute during the build? (I think it will, based on your changes, but we should check.)
            Hide
            shamika Shamika Gajanan Kulkarni (Inactive) added a comment - - edited

            The BookMarkTest.java was not executing during the build since the java file was not in the java folder and hence maven could not find the test class. When corrected, the test file runs successfully without any problem. The changes are present in the link below:
            https://bitbucket.org/skulka2710/shamika_igb/branch/IGBF-1981#diff
            Also, we had a discussion once that all the test cases need to be verified and so, I tried running all the test cases which are skipped during the build and found out that some test cases fail while others run successfully. I was trying to dig a little deeper into the ones failing and was thinking should we fix them or skip them just the way they are being skipped right now. Kindly let me know what should be done. For now, moving this ticket to Needs First Level review.

            Show
            shamika Shamika Gajanan Kulkarni (Inactive) added a comment - - edited The BookMarkTest.java was not executing during the build since the java file was not in the java folder and hence maven could not find the test class. When corrected, the test file runs successfully without any problem. The changes are present in the link below: https://bitbucket.org/skulka2710/shamika_igb/branch/IGBF-1981#diff Also, we had a discussion once that all the test cases need to be verified and so, I tried running all the test cases which are skipped during the build and found out that some test cases fail while others run successfully. I was trying to dig a little deeper into the ones failing and was thinking should we fix them or skip them just the way they are being skipped right now. Kindly let me know what should be done. For now, moving this ticket to Needs First Level review.
            Hide
            ann.loraine Ann Loraine added a comment -

            Sorry, I am little bit confused. Do you mean you moved the file with test cases (add-the-rate Test annotation) into the "test" folder? If yes, that is correct. If you do that, then maven will locate the tests and run them during the default lifecycle. Also, your addition to the pom will ensure they can run, since they depend on junit. If there are other "Test" files under the "main" folder, then they should also be moved to "test".

            Show
            ann.loraine Ann Loraine added a comment - Sorry, I am little bit confused. Do you mean you moved the file with test cases (add-the-rate Test annotation) into the "test" folder? If yes, that is correct. If you do that, then maven will locate the tests and run them during the default lifecycle. Also, your addition to the pom will ensure they can run, since they depend on junit. If there are other "Test" files under the "main" folder, then they should also be moved to "test".
            Hide
            shamika Shamika Gajanan Kulkarni (Inactive) added a comment -

            Actually they were in the Test folder but not under Java. Maven locates the test sources under "src/test/java", and the path in our IGB project for BookMarkTest.java was "src/test/com/..." I just moved the file to "src/test/java/com...". This way, maven could locate and run the test file. Sorry for not being clear about this earlier.
            Yes I have checked for the notations and this was the only test class in BookMarks plugin.

            Show
            shamika Shamika Gajanan Kulkarni (Inactive) added a comment - Actually they were in the Test folder but not under Java. Maven locates the test sources under "src/test/java", and the path in our IGB project for BookMarkTest.java was "src/test/com/..." I just moved the file to "src/test/java/com...". This way, maven could locate and run the test file. Sorry for not being clear about this earlier. Yes I have checked for the notations and this was the only test class in BookMarks plugin.
            Show
            shamika Shamika Gajanan Kulkarni (Inactive) added a comment - PR submitted. https://bitbucket.org/lorainelab/integrated-genome-browser/pull-requests/746/igbf-1981-add-bookmarktestjava-in-java/diff Kindly review.
            Hide
            prutha Prutha Kulkarni (Inactive) added a comment -

            Shamika Gajanan Kulkarni, I've tested your version of BookMarkTest.java in netbeans and it is not showing any errors now. Also, when I tried to build it, it is not throwing any exceptions.
            Moving it to DONE.

            Show
            prutha Prutha Kulkarni (Inactive) added a comment - Shamika Gajanan Kulkarni , I've tested your version of BookMarkTest.java in netbeans and it is not showing any errors now. Also, when I tried to build it, it is not throwing any exceptions. Moving it to DONE.

              People

              • Assignee:
                shamika Shamika Gajanan Kulkarni (Inactive)
                Reporter:
                svallapu Sai Charan Reddy Vallapureddy (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: