开发者

Launch selenium tests for Chrome browser via jenkins slave

开发者 https://www.devze.com 2023-04-05 11:27 出处:网络
I have following jenkins setup - master node on centOS, slave node on windows server 2008 R2(run as windows service).

I have following jenkins setup - master node on centOS, slave node on windows server 2008 R2(run as windows service). Used selenium server: 2.5.0 Test is using Selenium 1 API.

I am launching hudson job which tries to run simple selenium test on windows slave node. Launch string is following: ant run-tests -Dhost=localhost "-Dbrowser-type=*googlechrome"

Job fails with following errors:

[testng] java.lang.RuntimeException: Could not start Selenium session: Failed to start new browser session: org.openqa.selenium.os.WindowsRegistryException: Problem while managing the registry, OS Version '6.1',开发者_如何学Go regVersion1 = false
[testng] Build info: version: '2.5.0', revision: '13516', time: '2011-08-23 18:29:57'
[testng] System info: os.name: 'Windows Server 2008 R2', os.arch: 'amd64', os.version: '6.1', java.version: '1.6.0_26'
[testng] Driver info: driver.version: unknown
[testng]    at com.thoughtworks.selenium.DefaultSelenium.start(DefaultSelenium.java:104)
[testng]    at com.thoughtworks.selenium.DefaultSelenium.start(DefaultSelenium.java:109)
[testng]    at com.frostdigital.framework.DefaultUITest.startSelenium(Unknown Source)
....

If I connect via RDP to that workstation and execute this command manually, all works fine. The job for running tests on firefox also works normally.

Any suggestions what can cause this problem?


I've experienced this problem when I ran Jenkins is a windows service, they cannot open windows (as far as I know) so the browser will never open. Launch the slave via the web interface once and try it that way. My bet is the browser will at least open.


FYI, we just had the same issue with a TeamCity build agent running as a Windows service - our solution was to go into the 'Log On' tab of the service properties and check 'Allow service to interact with desktop'.


For me the problem got solved by having the windows service log on with an account other than the local system account. BTW my setup is Selenium 2.20 on Windows 7.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号