Running remote selenium tests throws error: '[testng] Unknown option: -sourcedir' - ant

I have a cluster of VM's (all Windows 7) that I am trying to use to run some continuous integration from Jenkins. The tests are written in Java and from my local environment (windows 7) I can remotely connect to a VM and run my tests without any problems.
When I schedule the tests to run in Jenkins, I use the same command line arguments but during execution I get:
...
start-server:
doTest:
[testng] Usage: <main class> [options]
[testng] The XML suite files to run
[testng] Unknown option: -sourcedir
[testng] Options:
[testng] -configfailurepolicy Configuration failure policy (skip or
[testng] continue)
[testng] -d Output directory
[testng] -dataproviderthreadcount Number of threads to use when running
[testng] data providers
[testng] -excludegroups Comma-separated list of group names to
[testng] exclude
[testng] -groups Comma-separated list of group names to be
[testng] run
[testng] -junit JUnit mode
[testng] Default: false
[testng] -listener List of .class files or list of class
[testng] names implementing ITestListener or
[testng] ISuiteListener
[testng] -methods Comma separated of test methods
[testng] Default: []
[testng] -methodselectors List of .class files or list of class
[testng] names implementing IMethodSelector
[testng] -objectfactory List of .class files or list of class
[testng] names implementing ITestRunnerFactory
[testng] -parallel Parallel mode (methods, tests or classes)
[testng] -port The port
[testng] -reporter Extended configuration for custom report
[testng] listener
[testng] -suitename Default name of test suite, if not
[testng] specified in suite definition file or
[testng] source code
[testng] -suitethreadpoolsize Size of the thread pool to use to run
[testng] suites
[testng] Default: 1
[testng] -testclass The list of test classes
[testng] -testjar A jar file containing the tests
[testng] -testname Default name of test, if not specified in
[testng] suitedefinition file or source code
[testng] -testnames The list of test names to run
[testng] -testrunfactory, -testRunFactory The factory used to create tests
[testng] -threadcount Number of threads to use when running
[testng] tests in parallel
[testng] -usedefaultlisteners Whether to use the default listeners
[testng] Default: true
[testng] -log, -verbose Level of verbosity
[testng]
stop-server:
[selenium-shutdown] Getting: http://localhost:4444/selenium-server/driver/?cmd=shutDown
[selenium-shutdown] To: /var/lib/jenkins/jobs/HomePage/workspace/result.txt
[selenium-shutdown] DGF Errors during shutdown are expected
My Jenkins instance runs on a different box (ubuntu). I just upgraded to Ant 1.8.2 on that box. Can this be a testng issue? I've seen this issue a few places but no concrete answers yet, any help is appreciated, thanks.

For some reason, Jenkins is passing "-sourcedir" to TestNG, which is not a recognized option.

Related

Jenkins throws FindFailed: exception Sikuli

I am using sikuli-script.jar to click on images link with Selenium WebDriver (With TestNG framework). The same is working fine when i run my code Run as TestNGSuite or with ant run (from the command prompt).
Below is my code:-
WebDriver driver=new FirefoxDriver();
driver.get("http://google.com");
driver.manage().window().setSize(new Dimension(1366, 768));
driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
System.out.println("Title is " +driver.getTitle());
System.out.println("Browser opened");
try {
Screen s=new Screen();
Pattern image=new Pattern("D:\\LoyalityFiles\\gmail\\1476714460371.png");
s.find(image);
s.click(image);
System.out.println("clicked on gmail");
System.out.println("Title of this page is " +driver.getTitle()+" and url is " +driver.getCurrentUrl());
driver.quit();
} catch (Exception e) {
e.printStackTrace();
}
}
issue:- While running this code via jenkins it throws :-
FindFailed: can not find P(D:\LoyalityFiles\gmail\1476714460371.png) S: 0.7 on the screen.
[testng] Line 1574, in file Region.java
[testng]
[testng] at org.sikuli.script.Region.handleFindFailed(Region.java:1574)
[testng] at org.sikuli.script.Region.wait(Region.java:1682)
[testng] at org.sikuli.script.Region.find(Region.java:1590)
[testng] at sikuli.ImageC.Google(ImageC.java:33)
[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:606)
[testng] at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
[testng] at org.testng.internal.Invoker.invokeMethod(Invoker.java:639)
[testng] at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:816)
[testng] at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1124)
[testng] at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
[testng] at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108)
[testng] at org.testng.TestRunner.privateRun(TestRunner.java:774)
[testng] at org.testng.TestRunner.run(TestRunner.java:624)
[testng] at org.testng.SuiteRunner.runTest(SuiteRunner.java:359)
[testng] at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:354)
[testng] at org.testng.SuiteRunner.privateRun(SuiteRunner.java:312)
[testng] at org.testng.SuiteRunner.run(SuiteRunner.java:261)
[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:1215)
[testng] at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
[testng] at org.testng.TestNG.run(TestNG.java:1048)
[testng] at org.testng.TestNG.privateMain(TestNG.java:1355)
[testng] at org.testng.TestNG.main(TestNG.java:1324)
please note:- i am running jenkins as windows service. pls suggest!!
SikuliX cannot find your pattern on the Screen during 3 seconds (default value, Settings.AutoWaitTimeout) and throws FindFailed exception. Try to raise Settings.AutoWaitTimeout or implement own smart waiter instead of screen.find()

" java.lang.IllegalStateException: The driver is not executable" error is coming when TestNG test cases run on Jenkins install on ubuntu 14.1

"java.lang.IllegalStateException: The driver is not executable" error is coming when TestNG test cases run on Jenkins install on ubuntu 14.1. As if Chromedriver is not starting on jenkin installed on ubuntu, Same configuration tried on jenkin install on Window os, works fine.Please provide me any solution if any.
Console Ouput :
run:
[testng] org.testng.TestNGException:
[testng] Cannot instantiate class TestCase.NewsArticles_Section_TC
[testng] at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:38)
[testng] at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:387)
[testng] at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:299)
[testng] at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:110)
[testng] at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:186)
[testng] at org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:120)
[testng] at org.testng.TestRunner.initMethods(TestRunner.java:409)
[testng] at org.testng.TestRunner.init(TestRunner.java:235)
[testng] at org.testng.TestRunner.init(TestRunner.java:205)
[testng] at org.testng.TestRunner.<init>(TestRunner.java:153)
[testng] at org.testng.SuiteRunner$DefaultTestRunnerFactory.newTestRunner(SuiteRunner.java:522)
[testng] at org.testng.SuiteRunner.init(SuiteRunner.java:157)
[testng] at org.testng.SuiteRunner.<init>(SuiteRunner.java:111)
[testng] at org.testng.TestNG.createSuiteRunner(TestNG.java:1299)
[testng] at org.testng.TestNG.createSuiteRunners(TestNG.java:1286)
[testng] at org.testng.TestNG.createSuiteRunners(TestNG.java:1289)
[testng] at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
[testng] at org.testng.TestNG.run(TestNG.java:1057)
[testng] at org.testng.TestNG.privateMain(TestNG.java:1364)
[testng] at org.testng.TestNG.main(TestNG.java:1333)
[testng] Caused by: java.lang.reflect.InvocationTargetException
[testng] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[testng] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
[testng] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[testng] at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
[testng] at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:29)
[testng] ... 19 more
[testng] Caused by: java.lang.ExceptionInInitializerError
[testng] at pagefactory.NewsArticle_Section.NewsArticle_Section_Add.<init>(NewsArticle_Section_Add.java:18)
[testng] at TestCase.NewsArticles_Section_TC.<init>(NewsArticles_Section_TC.java:14)
[testng] ... 24 more
[testng] Caused by: java.lang.IllegalStateException: The driver is not executable: /var/lib/jenkins/jobs/Mentis kitchen test/workspace/lib/chromedriver.exe
[testng] at com.google.common.base.Preconditions.checkState(Preconditions.java:197)
[testng] at org.openqa.selenium.remote.service.DriverService.checkExecutable(DriverService.java:126)
[testng] at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:117)
[testng] at org.openqa.selenium.chrome.ChromeDriverService.access$0(ChromeDriverService.java:1)
[testng] at org.openqa.selenium.chrome.ChromeDriverService$Builder.findDefaultExecutable(ChromeDriverService.java:118)
[testng] at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:291)
[testng] at org.openqa.selenium.chrome.ChromeDriverService.createDefaultService(ChromeDriverService.java:82)
[testng] at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:117)
[testng] at reusablescript.driver.<clinit>(driver.java:12)
[testng] ... 26 more
[testng] The tests failed.
makexsltreports:
Looks like you are trying to run chromedriver.exe on Linux. You have to download binary file for Linux. .exe from stack trace doesn't look like correct one.
Then you have to add executable flag to it chmod +x chromedriver
Given below permission to chromedriver and it works.
chmod 777 chromedriver
As previous answer there is no relevance to the .exe part in stack trace

Error running selenium webdriver/testng tests headless on a jenkins CI server

I'm running Selenium tests using a testNG framework, and an ANT task. The tests run fine on my windows machine..I then deployed it to my Jenkins CI server, and making necessary configurations for running the tests headless:
installed vnc-server on my server running jenkins (CentOS)
installed the Xvnc plugin for jenkins and enabled 'run Xvnc during build' in my job config
However I get the below error - any help? I have scoured the web but am unable to find a solution to: "org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console "
[workspace] $ /root/.jenkins/tools/hudson.tasks.Ant_AntInstallation/Ant/bin/ant
Buildfile: /root/.jenkins/jobs/automationFramework/workspace/build.xml
compile:
[javac] /root/.jenkins/jobs/automationFramework/workspace/build.xml:28: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 2 source files to /root/.jenkins/jobs/automationFramework/workspace/test-output
test:
[testng] [TestNG] Running:
[testng] /root/.jenkins/jobs/automationFramework/workspace/src/automationFramework/testng.xml
[testng]
[testng] org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
[testng] *** EM_LOG *** Item Installed via directory addition to Install Location: app-global Item ID: {972ce4c6-7e08-4474-a285-3208198ce6fd}, attempting to register...
[testng] *** EM_LOG *** Item Installed/Upgraded at Install Location: app-global Item ID: {972ce4c6-7e08-4474-a285-3208198ce6fd}, attempting to register...
[testng] *** Blocklist::_loadBlocklistFromFile: blocklist is disabled
[testng] *** EM_LOG *** ... success, item is compatible
[testng] *** EM_LOG *** Item Installed via directory addition to Install Location: app-profile Item ID: fxdriver#googlecode.com, attempting to register...
[testng] *** EM_LOG *** Item Installed/Upgraded at Install Location: app-profile Item ID: fxdriver#googlecode.com, attempting to register...
[testng] *** EM_LOG *** ... success, item is compatible
[testng] *** EM_LOG *** Item Installed via directory addition to Install Location: app-system-user Item ID: langpack-en-GB#firefox.mozilla.org, attempting to register...
[testng] *** EM_LOG *** Item Installed/Upgraded at Install Location: app-system-user Item ID: langpack-en-GB#firefox.mozilla.org, attempting to register...
[testng] *** EM_LOG *** ... success, item is compatible
[testng]
[testng] at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:118)
[testng] at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:246)
[testng] at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:114)
[testng] at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:193)
[testng] at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:186)
[testng] at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:182)
[testng] at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:95)
[testng] at automationFramework.GoogleTest.testGoogle(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:606)
[testng] at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
[testng] at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
[testng] at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
[testng] at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
[testng] at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
[testng] at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
[testng] at org.testng.TestRunner.privateRun(TestRunner.java:767)
[testng] at org.testng.TestRunner.run(TestRunner.java:617)
[testng] at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
[testng] at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
[testng] at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
[testng] at org.testng.SuiteRunner.run(SuiteRunner.java:240)
[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:1224)
[testng] at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
[testng] at org.testng.TestNG.run(TestNG.java:1057)
[testng] at org.testng.TestNG.privateMain(TestNG.java:1364)
[testng] at org.testng.TestNG.main(TestNG.java:1333)
selenium version-2.43
firefox - 3.6
Jenkins on centOS - 5.5
Thanks
it usually happens due to incompatible FF and WD versions. So, it makes sense to double check if versions you use are correct.

Maven 3 Jenkins Plugin - "Build Failure" for Hello World example

I am using Jenkins/Maven for the first time and am following these two tutorials together to write a Jenkins plugin: https://wiki.jenkins-ci.org/display/JENKINS/Plugin+tutorial and http://cleantestcode.wordpress.com/2013/11/03/how-to-write-a-jenkins-plugin-part-1/.
So far, these are the commands/data I've entered at the prompt on Windows:
mvn hpi:create -Pjenkins
enter "org.jenkins-ci.tools" as the groupId
enter "hello_world" as the artifactId
cd hello_world
mvn install
The result of step 5 is "BUILD FAILURE" with this output:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.9:test (default-test) on project hello_world: There are test failures. [ERROR]
[ERROR] Please refer to C:\$HOME\hello_world\target\surefire-reports for the individual test results. [ERROR] -> [Help 1] [ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging.
I have tried "mvn install -DskipTests" instead, but this way (I'm not sure how to phrase it) the command prompt never appears again and I am unable to enter any more commands.
My questions are these:
I have not modified any of the files generated by "mvn hpi:create -Pjenkins" so what could cause the default tests to fail?
Without the "-Pjenkins" flag, the command "mvn hpi:create" resulted in a build failure as well. What was the effect of adding the "-Pjenkins" flag?
Thanks in advance for any answers.
[Edit] Here are the contents of the Surefire reports:
-------------------------------------------------------------------------------
Test set: InjectedTest
-------------------------------------------------------------------------------
Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 14.697 sec <<< FAILURE!
org.jvnet.hudson.test.JellyTestSuiteBuilder$JellyTestSuite(org.jvnet.hudson.test.junit.FailedTest) Time elapsed: 0.012 sec <<< ERROR!
java.lang.ArrayIndexOutOfBoundsException: -1
at com.thoughtworks.xstream.core.util.OrderRetainingMap.entrySet(OrderRetainingMap.java:77)
at java.util.HashMap.putMapEntries(HashMap.java:511)
at java.util.HashMap.putAll(HashMap.java:784)
at com.thoughtworks.xstream.core.util.OrderRetainingMap.<init>(OrderRetainingMap.java:36)
at com.thoughtworks.xstream.converters.reflection.FieldDictionary.buildMap(FieldDictionary.java:135)
at com.thoughtworks.xstream.converters.reflection.FieldDictionary.fieldsFor(FieldDictionary.java:76)
at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:127)
at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:149)
at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:108)
at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)
at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:82)
at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37)
at com.thoughtworks.xstream.XStream.marshal(XStream.java:898)
at com.thoughtworks.xstream.XStream.marshal(XStream.java:887)
at com.thoughtworks.xstream.XStream.toXML(XStream.java:860)
at hudson.XmlFile.write(XmlFile.java:179)
at jenkins.model.Jenkins.save(Jenkins.java:2656)
at jenkins.model.Jenkins.setNoUsageStatistics(Jenkins.java:988)
at org.jvnet.hudson.test.HudsonTestCase.setUp(HudsonTestCase.java:320)
at org.jvnet.hudson.test.JellyTestSuiteBuilder$JellyTestSuite.setUp(JellyTestSuiteBuilder.java:133)
at org.jvnet.hudson.test.junit.GroupedTest.run(GroupedTest.java:49)
at junit.framework.TestSuite.runTest(TestSuite.java:255)
at junit.framework.TestSuite.run(TestSuite.java:250)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84)
at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:172)
at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:104)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:70)
testCliSanity(org.jvnet.hudson.test.PluginAutomaticTestBuilder$CliSanityTest) Time elapsed: 0.027 sec <<< ERROR!
java.lang.IllegalStateException: second instance
at jenkins.model.Jenkins.<init>(Jenkins.java:758)
at hudson.model.Hudson.<init>(Hudson.java:81)
at org.jvnet.hudson.test.HudsonTestCase.newHudson(HudsonTestCase.java:469)
at org.jvnet.hudson.test.HudsonTestCase.setUp(HudsonTestCase.java:312)
at junit.framework.TestCase.runBare(TestCase.java:139)
at org.jvnet.hudson.test.HudsonTestCase.runBare(HudsonTestCase.java:290)
at junit.framework.TestResult$1.protect(TestResult.java:122)
at junit.framework.TestResult.runProtected(TestResult.java:142)
at junit.framework.TestResult.run(TestResult.java:125)
at junit.framework.TestCase.run(TestCase.java:129)
at junit.framework.TestSuite.runTest(TestSuite.java:255)
at junit.framework.TestSuite.run(TestSuite.java:250)
at junit.framework.TestSuite.runTest(TestSuite.java:255)
at junit.framework.TestSuite.run(TestSuite.java:250)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84)
at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:172)
at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:104)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:70)
try to skip tests, change 5th command into:
5. mvn install -DskipTests

NoClassDefFoundError with Jenkins and Versant

Currently, I have an application which uses a Versant DB. I can build this application in ant and have an ant-task for unit testing. When I run the testing task from command line, all of the test cases will run correctly. However, when I try to run the ant testing task through Jenkins/Hudson, some of the test cases throw a NoClassDefFoundError looking for one of the Versant files. Can anyone tell me what I'm missing in Jenkins to fix this?
Stack Trace:
[junit] Testcase: warning(junit.framework.TestSuite$1): FAILED
[junit] Exception in constructor: testGetTransactionWithStubSelector (java.lang.NoClassDefFoundError: Could not initialize class com.versant.trans.TransSession
[junit] at com.projectName.database.SessionPool.createPooledObject(SessionPool.java:45)
[junit] at com.projectName.util.pooling.PoolManager$ReflectivePooledObjectHandler.createPooledObject(PoolManager.java:210)
[junit] at com.projectName.util.pooling.PoolManager.init(PoolManager.java:58)
[junit] at com.projectName.database.SessionPool.<init>(SessionPool.java:20)
[junit] at com.projectName.database.DB.<init>(DB.java:507)
[junit] at com.projectName.database.DB.get(DB.java:62)

Resources