Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Parallelizing Cucumber BDD test on multiple machines using Gems or Jenkins (or both)

I’m running a project using BDD with Cucumber (with page_object gem), Watir and Jenkins. Right now we’re looking the best way to parallelize test to reduce testing time on multiple virtual machines, with different navigators and so on.

I think there is two approaches:

  • to use a Ruby tool like parallel_test, Hydra, TestJour, TestBot...
  • or organize everything through Jenkins, using paths, tags, etc.
  • to use both in some way

In order to put effort on the right way… do you consider Jenkins is a good option to make parallel test on multiple machines or should I give a chance to another tool? Suggestions are welcome :)

like image 870
Pablo Gómez Avatar asked Dec 27 '22 00:12

Pablo Gómez


1 Answers

Jenkins is only a part of the solution. You can use parallel_tests to run multiple cukes concurrently (as long as your Jenkins server is not running on Windows) but you still need more.

You will need to setup a grid of servers to handle the watir tests. I strongly suggest you look at Selenium Grid 2 (http://code.google.com/p/selenium/wiki/Grid2). Setup nodes on your remote VMs and start the hub on your Jenkins server. Then parallel_tests can run the tests in parallel having them connect to the local hub which will in turn send them out to the remote servers for execution.

One note - In order for this to work well you need to have a good test data management strategy in place. Each tests needs to be able to run independently. In addition, they should each be responsible for setting up the necessary data for the test to run and then clean up that data after the test executes.

like image 167
Cheezy Avatar answered Jan 13 '23 23:01

Cheezy