开发者

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 b开发者_如何转开发uild machine that also runs Hudson.

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


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 )

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜