Проблема с запуском удалённых тестов на jenkins.
Есть готовый тест(Selenium + Ant). С локальной машины провожу запуск тестов используя ant + selenium server. Выглядит следующим образом
Ant-дескриптор
<target name="some_job" depends="compile">
<junit printsummary="true" fork="true" haltonfailure="true">
<formatter type="plain" usefile="false" />
<classpath>
<pathelement path="${build}" />
</classpath>
<classpath refid="classpath_for_add_materials" />
<test name="somejobpacket.SomeJob" />
</junit>
</target>
На своё машине, запускаю Selenium server, из командной строки, затем иду в корень проекта и запускаю тест
ant some_job
Все выполняется чудесно.
Теперь, запускаю Selenium server на удалённой машине через ssh, скажем удалённая машина имеет адрес - 10.1.1.11. На этом же удалённом компьютере установлен Jenkins последней версии. Создают Job, указываю все необходимые параметры: репозиторий, Run Xvnc during build, Targets. Теперь при запуске данного теста через Jenkins, получаю вот такое сообщение.
clean:compile:
[javac] Compiling 9 source files to /var/lib/jenkins/jobs/SomeJob - Create Order/workspace/buildsome_job:
Unable to obtain resource from /var/lib/jenkins/jobs/SomeJob - Create Order/workspace/resources/cert8.db: java.util.zip.ZipException: error in opening zip file
[junit] Unable to obtain resource from /var/lib/jenkins/jobs/SomeJob - Create Order/workspace/resources/cert8.db:
[junit] java.util.zip.ZipException: error in opening zip file
[junit] at java.util.zip.ZipFile.open(Native Method)
[junit] at java.util.zip.ZipFile.<init>(ZipFile.java:127)
[junit] at java.util.jar.JarFile.<init>(JarFile.java:135)
[junit] at java.util.jar.JarFile.<init>(JarFile.java:99)
[junit] at org.apache.tools.ant.AntClassLoader.getResourceURL(AntClassLoader.java:1002)
[junit] at org.apache.tools.ant.AntClassLoader$ResourceEnumeration.findNextResource(AntClassLoader.java:145)
[junit] at org.apache.tools.ant.AntClassLoader$ResourceEnumeration.<init>(AntClassLoader.java:109)
[junit] at org.apache.tools.ant.AntClassLoader.findResources(AntClassLoader.java:949)
[junit] at org.apache.tools.ant.AntClassLoader.getNamedResources(AntClassLoader.java:918)
[junit] at org.apache.tools.ant.loader.AntClassLoader5.getResources(AntClassLoader5.java:54)
[junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.checkForkedPath(JUnitTask.java:1135)
[junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeAsForked(JUnitTask.java:1011)
[junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:811)
[junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeOrQueue(JUnitTask.java:1808)
[junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:760)
[junit] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[junit] at java.lang.reflect.Method.invoke(Method.java:597)
[junit] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[junit] at org.apache.tools.ant.Task.perform(Task.java:348)
[junit] at org.apache.tools.ant.Target.execute(Target.java:390)
[junit] at org.apache.tools.ant.Target.performTasks(Target.java:411)
[junit] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397)
[junit] at org.apache.tools.ant.Project.executeTarget(Project.java:1366)
[junit] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[junit] at org.apache.tools.ant.Project.executeTargets(Project.java:1249)
[junit] at org.apache.tools.ant.Main.runBuild(Main.java:801)
[junit] at org.apache.tools.ant.Main.startAnt(Main.java:218)
[junit] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
[junit] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Unable to obtain resource from /var/lib/jenkins/jobs/SomeJob - Create Order/workspace/resources/cert_override.txt: java.util.zip.ZipException: error in opening zip file
[junit] Unable to obtain resource from /var/lib/jenkins/jobs/SomeJob - Create Order/workspace/resources/cert_override.txt:
[junit] java.util.zip.ZipException: error in opening zip file
[junit] at java.util.zip.ZipFile.open(Native Method)
[junit] at java.util.zip.ZipFile.<init>(ZipFile.java:127)
[junit] at java.util.jar.JarFile.<init>(JarFile.java:135)
[junit] at java.util.jar.JarFile.<init>(JarFile.java:99)
[junit] at org.apache.tools.ant.AntClassLoader.getResourceURL(AntClassLoader.java:1002)
[junit] at org.apache.tools.ant.AntClassLoader$ResourceEnumeration.findNextResource(AntClassLoader.java:145)
[junit] at org.apache.tools.ant.AntClassLoader$ResourceEnumeration.<init>(AntClassLoader.java:109)
[junit] at org.apache.tools.ant.AntClassLoader.findResources(AntClassLoader.java:949)
[junit] at org.apache.tools.ant.AntClassLoader.getNamedResources(AntClassLoader.java:918)
[junit] at org.apache.tools.ant.loader.AntClassLoader5.getResources(AntClassLoader5.java:54)
[junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.checkForkedPath(JUnitTask.java:1135)
[junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeAsForked(JUnitTask.java:1011)
[junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:811)
[junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeOrQueue(JUnitTask.java:1808)
[junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:760)
[junit] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[junit] at java.lang.reflect.Method.invoke(Method.java:597)
[junit] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[junit] at org.apache.tools.ant.Task.perform(Task.java:348)
[junit] at org.apache.tools.ant.Target.execute(Target.java:390)
[junit] at org.apache.tools.ant.Target.performTasks(Target.java:411)
[junit] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397)
[junit] at org.apache.tools.ant.Project.executeTarget(Project.java:1366)
[junit] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[junit] at org.apache.tools.ant.Project.executeTargets(Project.java:1249)
[junit] at org.apache.tools.ant.Main.runBuild(Main.java:801)
[junit] at org.apache.tools.ant.Main.startAnt(Main.java:218)
[junit] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
[junit] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
[junit] Running somejobpacket.SomeJob
[junit] Testsuite: somejobpacket.SomeJob
[junit] Tests run: 1, Failures: 0, Errors: 2, Time elapsed: 45.987 sec
[junit] Tests run: 1, Failures: 0, Errors: 2, Time elapsed: 45.987 sec
[junit]
[junit] Testcase: NewOrderFromAdmin took 45.965 sec
[junit] Caused an ERROR
[junit] Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
[junit]
[junit] (firefox:32408): Gtk-WARNING **: Locale not supported by C library.
[junit] Using the fallback ‘C’ locale.
[junit] Error: no display specified
[junit]
[junit] (firefox:32415): Gtk-WARNING **: Locale not supported by C library.
[junit] Using the fallback ‘C’ locale.
[junit] Error: no display specified
[junit]
[junit] Command duration or timeout: 45.66 seconds
[junit] Build info: version: ‘2.32.0’, revision: ‘6c40c18’, time: ‘2013-04-09 17:23:22’
[junit] System info: os.name: ‘Linux’, os.arch: ‘i386’, os.version: ‘2.6.38-10-generic’, java.version: ‘1.6.0_26’
[junit] Driver info: org.openqa.selenium.remote.RemoteWebDriver
[junit] org.openqa.selenium.WebDriverException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
[junit]
[junit] (firefox:32408): Gtk-WARNING **: Locale not supported by C library.
[junit] Using the fallback ‘C’ locale.
[junit] Error: no display specified
[junit]
[junit] (firefox:32415): Gtk-WARNING **: Locale not supported by C library.
[junit] Using the fallback ‘C’ locale.
[junit] Error: no display specified
[junit]
[junit] Command duration or timeout: 45.66 seconds
[junit] Build info: version: ‘2.32.0’, revision: ‘6c40c18’, time: ‘2013-04-09 17:23:22’
[junit] System info: os.name: ‘Linux’, os.arch: ‘i386’, os.version: ‘2.6.38-10-generic’, java.version: ‘1.6.0_26’
[junit] Driver info: org.openqa.selenium.remote.RemoteWebDriver
[junit] at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
[junit] at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:187)
[junit] at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
[junit] at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:554)
[junit] at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:216)
[junit] at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:111)
[junit] at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:129)
[junit] at UVOFramework.Methods.TurnUp(Methods.java:39)
[junit] at somejobpacket.SomeJob.setUp(SomeJob.java:25)
[junit] Caused by: org.openqa.selenium.remote.ErrorHandler$UnknownServerException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
[junit]
[junit] (firefox:32408): Gtk-WARNING **: Locale not supported by C library.
[junit] Using the fallback ‘C’ locale.
[junit] Error: no display specified
[junit]
[junit] (firefox:32415): Gtk-WARNING **: Locale not supported by C library.
[junit] Using the fallback ‘C’ locale.
[junit] Error: no display specified
[junit]
[junit] Build info: version: ‘2.32.0’, revision: ‘6c40c18’, time: ‘2013-04-09 17:23:22’
[junit] System info: os.name: ‘Linux’, os.arch: ‘i386’, os.version: ‘2.6.38-10-generic’, java.version: ‘1.6.0_26’
[junit] Driver info: driver.version: FirefoxDriver
[junit] at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:106)
[junit] at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:244)
[junit] at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:110)
[junit] at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:190)
[junit] at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:183)
[junit] at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:101)
[junit] at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
[junit] at org.openqa.selenium.remote.server.DefaultDriverFactory.callConstructor(DefaultDriverFactory.java:57)
[junit] at org.openqa.selenium.remote.server.DefaultDriverFactory.newInstance(DefaultDriverFactory.java:51)
[junit] at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:215)
[junit] at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:1)
[junit] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
[junit] at java.util.concurrent.FutureTask.run(FutureTask.java:138)
[junit] at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:169)
[junit] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
[junit] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
[junit] at java.lang.Thread.run(Thread.java:662)
[junit]
[junit] Caused an ERROR
[junit] null
[junit] java.lang.NullPointerException
[junit] at UVOFramework.Methods.TurnDown(Methods.java:51)
[junit] at somejobpacket.SomeJob.turnDown(SomeJob.java:31)
[junit]BUILD FAILED
/var/lib/jenkins/jobs/SomeJob - Create Order/workspace/build.xml:35: Test somejobpacket.SomeJob failedTotal time: 49 seconds
Build step ‘Invoke Ant’ marked build as failure
Terminating xvnc.
$ vncserver -kill :10
Killing Xvnc4 process ID 32338
Finished: FAILURE
Я встречался с данной проблемой не так давно, решил запускать Selenium RC, через код - тогда всё ок. Но в том случае, в логах выдается описание дейтсвий(сценария) Selenium RC, большой стектрейс вообщем, от которого стала задача избавится.
В чём может быть проблема?