Selenium testing machine Selenium testing machine selenium selenium

Selenium testing machine


Are you using Continuous Integration?If so, you should consider getting a plugin to have your CI software run the Selenium tests. Works like a charm for me with Jenkins.

Considering your particular setup, you could both have the amazon linux server run the tests with HTMLUnitDriver, and declare other machines (with a GUI and proper browser) as "nodes" to run your test on other browsers.

Link to a tutorial


Have you read this blog post by David Burns (Automated Tester):

http://www.theautomatedtester.co.uk/tutorials/selenium/selenium_rc_setup.htm

He describes the way to run selenese tests using HTMLSuite.

We are going to use the HTMLSuite commands of the Selenium Remote Control. This allows you run your Selenese Test Suites as is. The command should look like java -jar selenium-servre.jar -htmlsuite . Browser could be : -*firefox -*chrome -*iexplore -*iehta -*safari -*custom /path/to/browser

The path to the test suite and the results file should be a full path.

Here is an example command; java -jar selenium-server.jar -htmlsuite *iexplore http://www.theautomatedtester.co.uk c:\testsuite\testsuite.html c:\testsuite\results.html

I would point out that htmlunit does not seem to be a supported option so I would expect to use -*custom and provide a path to htmlunit.

This is legacy functionality so there is a chance it doesn't work as expected any more. HTMLSuite expects the tests to be in Selenese (HTML table) format, you mention trying with the PHP binding, I would not expect this to work. If you do want to use some PHP bindings I would suggest using Adam Saunter's fork of the facebook bindings, they are the most up to date and best supported.

https://github.com/Element-34/saunter.php


With Selenium WebDriver you can point to start a HtmlUnit in a already started node

In Java you'll do something like this:

IWebDriver driver = new RemoteWebDriver(new Uri("http://localhost:4444/wd/hub"), DesiredCapabilities.HtmlUnit());

To start the node just make sure to set browserName to 'htmlunit'.