ducati1212
ducati1212

Reputation: 855

Trying to run selenium 2 scripts remotely

I have selenium 2 web driver scripts up and running and I now want to tie those into my continuous integration process. I have 2 physical machines set aside for selenium to run on and a VM machine for our build machine that also runs Hudson.

How do I have Hudson start selenium scripts on a remote machine?

Upvotes: 3

Views: 3340

Answers (1)

Ivo Grootjes
Ivo Grootjes

Reputation: 612

This is an answer for the c# bindings, I guess you're using the java bindings but it should almost be the same.

First you should start the selenium server on the remote selenium server using the selenium-server-standalone-2.0b3.jar found here: http://code.google.com/p/selenium/downloads/list

You start it using:

java -jar selenium-server-standalone-2.0b3.jar

In your test you use the RemoteWebDriver like this:

var desiredCapabilities = DesiredCapabilities.Firefox();
var selenium = new RemoteWebDriver(new Uri("http://seleniumserver1:4444/wd/hub"), desiredCapabilities);

That should make sure your testscripts send all webdriver commands to the remote server.

Grid 2.0 should be in selenium 2.0 beta 4 making it easier to use both selenium servers. ( I guess now you could switch server urls by yourself )

Upvotes: 5

Related Questions