3
我有一个运行一些Selenium测试的ant脚本。当从Windows运行并且在Putty bash终端中以Jenkins
用户运行时,这是完美的,因为必要的vncserver
先前由jenkins
用户启动,并且DISPLAY
变量设置为:43
。我在Jenkins CI服务器中调用相同的ant脚本。环境变量DISPLAY
也在Jenkins Web界面中配置为:43
。我收到错误消息是如下:通过调用Ant从Jenkins运行硒测试
[junit] Setting selenium logging level to: FINE
[junit] org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7056 after 45000 ms. Firefox console output:
[junit] Xlib: connection to ":43.0" refused by server
[junit] Xlib: No protocol specified
[junit]
[junit] Error: cannot open display: :43
[junit]
[junit] at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:95)
[junit] at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:157)
[junit] at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:93)
[junit] at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:136) [junit] at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:78)
[junit] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [junit] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) [junit] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) [junit] at java.lang.reflect.Constructor.newInstance(Constructor.java:513) [junit] at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:147)
这个消息是非常相似的,当vncserver
开始用不同的用户那么谁开始测试的一个,我收到了一个。然而,现在情况并非如此,因为我已经仔细检查过,测试者和VNC都是从jenkins
开始的。
这是一个Solaris服务器,如果需要帮助我的任何细节请询问。
有趣...你什么也没做,但答案是接受你自己... hahaha – 2013-01-10 12:31:00
是的。然而,也许这个小故事给人一点希望,所以我决定回答q并接受a。 – jabal 2013-01-10 21:34:38
不用担心,玩得开心 – 2013-01-11 03:54:18