Sunday, 11 July 2010

Selenium Grid Part 2 - Getting Hudson to run the tests

In Part 1 of this series I just did a basic Selenium Grid setup. In this part I will look at getting Hudson set up and have that running your tests on command or triggered when some one checks in some code. I will just get it set up to run the tests on command from a local directory as at home I don't have a source control system or code that can be checked in and then tested.

For this I assume you already familiar with the concepts and setup in Part 1.
On the Hub server shut down Selenium Grid Hub and following the Ubuntu/Debian instructions on the Hudson site:

You can now got to http://[hub ip]:8080/ and Hudson will be up and running.

In Hudson:
  • Manage Hudson -> Manage Plugins -> Advance
  • Click "Check Now" in bottom right corner
  • From the Updates page install any plugins that need to be updated
  • From the Available Plugins in page select Selenium Plugin which has the description of "This plugin turns your Hudson cluster into a Selenium Grid cluster"
  • Install it

Hudson is now responsible for running the Selenium Grid Hub and you can see it at http://[hub ip]:4444/console you can also see a new item on the Hudson menu for Selenium Grid and this will show you that your Remote Control nodes have hooked up.

So now we will make a job that runs the example build in parallel so we can see it run on the nodes.
  • I set up a Free Style Project
  • I gave it a custom workspace of /home/selenium/selenium-grid-1.0.8 this is where I unzipped things in Part 1
  • I'm just executing shell command of ant run-demo-in-parallel
  • Save that and from the dash board click build and watch the screen on your nodes
  • You will see the browsers pop up on the nodes and do stuff. Like Part 1 the tests will fail


The Series:

Upcoming ideas for the series:
  • Putting the test suite in SVN and running from there

References:

0 comments: