I get the following error when running a build from jenkins: I have narrowed it down to ant or the environment not being able to find my BrowserLaunch.class file, “no logs are coming from that file”, thus it says there is nosuchmethod. However, I have no idea why! I have these tests working on a different environment using Eclipse, but not with Ant + Jenkins + TestNG + Java. Any idea’s ? I have a selenium grid running on a different VM than the jenkins build server, and they can ping… The remote webdriver code points to the grid hub . I think it may be permissions, but all class files have the same rw access. All the necessary classes are in the .jar I build from ANT.
AILED CONFIGURATION: @BeforeTest beforeTest(org.testng.TestRunner@108c35f3)
[testng] java.lang.NoSuchMethodError:genericscripts.driverscripts.BrowserLaunch.createDriver(Ljava/lang/String;)Lorg/openqa/selenium/WebDriver;
[testng] tests.ManagementTests.beforeTest(Unknown Source)
[testng] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[testng] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[testng] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[testng] at java.lang.reflect.Method.invoke(Method.java:601)
[testng] at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:76)
[testng] at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:525)
[testng] at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:202)
[testng] at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:130)
[testng] at org.testng.TestRunner.beforeRun(TestRunner.java:624)
[testng] at org.testng.TestRunner.run(TestRunner.java:592)
[testng] at org.testng.SuiteRunner.runTest(SuiteRunner.java:317)
[testng] at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:312)
[testng] at org.testng.SuiteRunner.privateRun(SuiteRunner.java:274)
[testng] at org.testng.SuiteRunner.run(SuiteRunner.java:223)
[testng] at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
[testng] at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
[testng] at org.testng.TestNG.runSuitesSequentially(TestNG.java:1039)
[testng] at org.testng.TestNG.runSuitesLocally(TestNG.java:964)
[testng] at org.testng.TestNG.run(TestNG.java:900)
[testng] at org.testng.TestNG.privateMain(TestNG.java:1182)
[testng] at org.testng.TestNG.main(TestNG.java:1146)
[testng]
[testng] SKIPPED: createTenanttests(org.testng.TestRunner@108c35f3)
[testng]
[testng] ===============================================
[testng] Test
[testng] Tests run: 1, Failures: 0, Skips: 1
[testng] Configuration Failures: 1, Skips: 0
[testng] ===============================================
I had duplicate classes on the file system, and the ant build file was picking up the old one, instead of the new. Once that was deleted, I got past that error,