GentleMurderer
GentleMurderer

Reputation: 43

Launch selenium tests for Chrome browser via jenkins slave

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', 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?

Upvotes: 2

Views: 6087

Answers (3)

Michiel Verkaik
Michiel Verkaik

Reputation: 2581

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.

Upvotes: 0

James Baxter
James Baxter

Reputation: 1246

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'.

Upvotes: 0

Cameron
Cameron

Reputation: 179

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.

Upvotes: 4

Related Questions