1

I'm trying to set up webdriver test (with firefoxdriver) in hudson.

In my ant file, I start "vncserver :1" firstly and then start my test by passing

γ€ˆenv key="DISPLAY" value=":1" /〉

to my test case.

I can run this in a terminal with sudo. However when I start the job in hudson (running with root), I always got:

org.openqa.selenium.WebDriverException: Unable to bind to locking port 7054 within 45000 ms System info: os.name: 'Linux', os.arch: 'i386', os.version: '2.6.18-128.1.14.el5a02xen', java.version: '1.6.0_31' Driver info: driver.version: FirefoxDriver at org.openqa.selenium.internal.SocketLock.lock(SocketLock.java:92) at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:71) at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:142) at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:85) at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:121) at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:77) at amazon.dropship.selfservice.test.WebTesterImpl.(WebTesterImpl.java:38) at amazon.dropship.selfservice.test.WebTesterImpl.getInstance(WebTesterImpl.java:48) at amazon.dropship.selfservice.test.DSCentralTestBase.setUp(DSCentralTestBase.java:39) at amazon.dropship.selfservice.test.smoke.ReadOnlyTests.setUp(ReadOnlyTests.java:11)

ComfortablyNumb
  • 3,391
  • 2
  • 14
  • 15
  • Are you using the selenium server at your hudson's machine? – Pazonec Mar 06 '12 at 15:50
  • Have you tried these Hudson plugin: 1. https://wiki.jenkins-ci.org/display/JENKINS/Xvfb+Plugin 2. http://wiki.hudson-ci.org/display/HUDSON/Xvnc+Plugin Might be helpful in your case. – Manpreet Singh Apr 24 '12 at 23:16

1 Answers1

0

I forgot to add the environment variables:

  • HOME =/root
  • USER = root

That was all. Thanks for looking at this

ComfortablyNumb
  • 3,391
  • 2
  • 14
  • 15