Selenium Grid and the parallel smoke test suite

At the QA team we have been playing for a while with Selenium Grid, a great tool to run Selenium tests in parallel.
The first task was to reduce the execution time of the Smoke Test Suite having more than one browser running the tests. This is a complex suite with a lot of dependencies, so there's a limit on the parallelization that is possible to achieve. Pablo Luján prepared a graph to explain this a little better:

Even though we have reduced the execution time of 114 tests from 160 minutes to 90 minutes. And we are working on some options to reduce this even more.
Now that the integration of our testing code has been thoroughly tested we are ready to promote the changes from the experimental branch to the stable one. But this change will require some adjustments on the jobs and scripts.
We have new components: a Selenium Hub and one or more Grid Remote Controllers. The Remote Controllers register themselves with the Hub and wait for requests. The Hub will send tests to idle RCs or queue them if none is available. And the RCs will execute the actions on his browser.
In order to execute a suite on the Grid, the first step will be to create a Firefox profile for each Remote Controller. Otherwise, all the browsers in a machine will share the Openbravo session, a bad idea because the tests involve starting and closing sessions many times. The following command will create a new profile named rc1:
firefox -no-remote -CreateProfile rc1
Then, the Selenium Hub has to be started:
ant seleniumhub.start < /dev/null &
After that, start the Remote Controllers with an instruction like:
ant -Dport=5555 -DseleniumArgs="-firefoxProfileTemplate /srv/hudson/.mozilla/firefox/g2jc2ulk.rc1"
And finally, run the test suite and enjoy your successful tests:
ant test.integration.smoke -f src-test/com/openbravo/test/integration/erp/testsuites/smoke/build.xml.
More details can be found at the wiki. And we have documented there some options to execute tests sequentially as before.
The second task with the grid will be to use it with independent tests that can be fully parallelized. So if we have 100 tests on a suite and 100 Remote Controllers, the whole suite will be executed... really fast :) More about this tomorrow...