My initial setup will involve three Ubuntu VMs. One Ubuntu Server running the hub and two Ubuntu Desktops acting as the nodes. They were set up using the VMWare Player creation tool that does all the work for and installs VMWare Tools and hides most of the install prompts for to help speed the roll out. Then I changed the APT details to use my internal APT Mirror and updated, I also changed the time zone to be New Zealand and installed an SSH server. Everything else I have done the VMs will be list below as it will count as getting Selenium Grid up and running.
Install some things that are needed on all of the machines (sun-java6-jdk is the Canonical Partner repository):
- sudo apt-get install unzip sun-java6-jdk ant ant-optional
I rebooted the systems after this so all the updates could apply and the PATHS all get updated.
On all of the machines download Selenium Grid (http://selenium-grid.seleniumhq.org/download.html) and extract it
- wget http://release.seleniumhq.org/selenium-grid/selenium-grid-1.0.8-bin.zip
- unzip selenium-grid-1.0.8-bin.zip
- cd selenium-grid-1.0.8/
- ant sanity-check
The ant sanity-check will check that everything is installed correctly
On the hub machine start the hub
- ant launch-hub
Give it a little bit to start up and then go to the following URL and you can check that it is all up and running by looking at http://
On each of the nodes run the following command to start the remote controls, you will have to do this from a terminal on the desktop, so it knows where the display is so can run your browser.
- ant -Dport=5555 -Dhost=[node ip]
-DhubURL=http://[hub ip] :4444/ launch-remote-control
Have a look at http://[hub ip]
On your desktop from the selenium-grid-1.0.8 directory run the following (you will need the JDK and Ant on this machine as well)
- ant run-demo-in-parallel
On both of the desktops you will see Firefox open up a do stuff. It does fail as I believe Google has changed their site since the example tests were written. But you can see everything opening up and running the tests in parallel over the two desktops.
- Part 1 - Getting Started
- Part 2 - Getting Hudson to run the tests
- Part 3 - Integrating Selenium Python tests with Hudson and having them run in parallel
- Part 4 - How to get Multiple Browsers and Operating Systems working
Upcoming ideas for the series:
- Putting the test suite in SVN and running from there