How to manually test before submitting a pull request (potential bug?)

25 views
Skip to first unread message

Ryan Bennetts

unread,
Oct 20, 2016, 12:28:16 AM10/20/16
to infinitest-dev
Hi all

I'm currently working on issue #92 (support JUnit categories) [https://github.com/infinitest/infinitest/issues/92]. I think my code works (my automated tests pass), but I'm running into problems when I try to manually test my changes.

How do you guys go about verifying that your changes are ok before submitting a pull request?

Here's the issue: 
After following the instructions in the README, infinitest turns the bar red and reports the following error in the eclipse 'Problems' view:
  • NoClassDefFoundError (com/google/common/collect/ImmutableList)
With a bit of digging around through the code, I've been able to reproduce the issue with the master branch when running TestNG tests, so I now know that this problem is not the result of my changes. My changes are just surfacing the TestNG issues for JUnit tests as well now.

Here's how to reproduce the issue:
If anyone can suggest a fix, or an alternative way for me to manually test my changes before submitting a pull request, I'd be grateful.

I'm following the process in the project's README:
  1. run 'mvn clean install eclipse:clean eclipse:eclipse' in the infinitest project root directory
  2. start eclipse, import existing project, select root of infinitest project
  3. open infinitest-eclipse/plugin.xml
  4. select 'Launch an Eclipse Application'
Then
  1. download the TestNG jar file from http://central.maven.org/maven2/org/testng/testng/6.9.13.6/testng-6.9.13.6.jar
  2. in the new instance of eclipse, create a new project and add the TestNG jar to the java build path
  3. create a new file FooTest with the following content:
    public class FooTest {
      @org.testng.annotations.Test 
      public void test() {
        org.testng.Assert.assertEquals(true, true);
      }
    }
     
    After saving the file you should now see the above error in the 'Problems' view.

    Possible Cause
    I suspect the issue is related to the fact that TestNGConfigurator depends on FileBasedInfinitestConfigurationSource, which in turn uses the guava libs. However, the guava jar file doesn't appear on the infinitest runner classpath when I follow the steps above.

    Not sure if this is a recent bug, or if there's another way I should be testing infinitest manually.

    Cheers for any help,

    -- Ryan 

    Sebastien Arod

    unread,
    Oct 20, 2016, 8:50:21 AM10/20/16
    to infinitest-dev
    Hi Ryan,

    To manually test infinitest for eclipse I start eclipse from the plugin.xml.

    I reproduced locally. It seems I introduced a bug when I changed the way infinitest configuration is parsed. I tested manually junit tests bugt I didn't realize I broke the testng execution.

    I'll look into this as soon as possible.

    -Seb

    --
    You received this message because you are subscribed to the Google Groups "infinitest-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to infinitest-de...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    Sebastien Arod

    unread,
    Oct 20, 2016, 10:35:40 AM10/20/16
    to infinitest-dev
    Hi Ryan,

    This should be fixed in master there was a problem in the packaging.

    Please be sure to run mvn clean install on infinitest-parent before relaunching your tests.

    -Seb

    Ryan Bennetts

    unread,
    Oct 21, 2016, 12:29:48 AM10/21/16
    to infinitest-dev
    Brilliant, thanks Seb. I'll give it a go this weekend and hopefully get the new pull request out. :)

    -- Ryan 
    Reply all
    Reply to author
    Forward
    0 new messages