0

Running same Cucumber Features on different machines concurrently using parallel_tests gem

I'm trying to figure out how to use the parallel_tests gem to run the EXACT SAME Cucumber Features on a variety of different machines concurrently.

Currently I have them running on different machines but the SAME features do not execute, it just splits up the features and runs different features on different machines.

More clarification on what I want to do:

MACHINE 1 (Win 7) - EXECUTE SAME FEATURES CONCURRENTLY
MACHINE 2 (Win 8) - EXECUTE SAME FEATURES CONCURRENTLY
MACHINE 3 (Mac OS X) - EXECUTE SAME FEATURES CONCURRENTLY
...

Also my architecture is:

Cucumber -> Capybara -> Selenium Webdriver -> Selenium Grid

parallel_tests gem: https://github.com/grosser/parallel_tests

Farooq
  • 1,925
  • 3
  • 15
  • 36
  • In my understanding the propose of parallel_tests is to run DIFFERENT features in different machines to shorten the waiting for run the whole suite. What do you want really to do? – mvidaurre Jul 25 '14 at 15:47
  • Because if you want to run the whole suite in each computer then run that independently but at the same time. Please clarify your propose. – mvidaurre Jul 25 '14 at 15:49
  • I want to run the SAME features on multiple machines (OSs/browsers) to cover all the supported environments... – Farooq Jul 25 '14 at 18:58

3 Answers3

0

The parallel_tests gem is really purposed to parallellism, not executing multiple platforms.

You may find the following useful: Sauce Gem 30 rake tasks

"The Sauce integration is currently targeted at RSpec and Cucumber, running on a local server you can spin up multiple copies of. It runs a copy of each test for each platform, and divides them up across all the concurrency available to your Sauce Labs account by default"

Hope it helps, I haven't used it myself yet.

Adriaan
  • 3,282
  • 1
  • 23
  • 31
0

Thanks for the clarification. To accomplish testing your app for all the supported environments (OSs/browsers) you can use something as Selenium Grid here is an example Selenium RC: Run tests in multiple browsers automatically.

TestingBot is a service that use this: http://blog.testingbot.com/2012/02/19/selenium-cucumber-capybara

Other approach is described here: http://altoros.github.io/2013/running-capybara-tests-in-remote-browsers/

http://paauspaani.blogspot.mx/2013/05/running-tests-remotely-using-selenium.html

There is also a presentation: http://www.slideshare.net/martinkleppmann/crossbrowser-testing-in-the-real-world

Also this could help you Has anyone figured out a way to run the same cucumber scenario on multiple browsers/web drivers?

Hopefully this will give you some clues.

Community
  • 1
  • 1
mvidaurre
  • 489
  • 3
  • 6
0

I am confused by this statement of yours:

Currently I have them running on different machines but the SAME features do not execute, it just splits up the features and runs different features on different machines.

parallel_tests is used for splitting up tests and running them on multiple cores, not on a distributed environment of multiple machines. It can group tests to be run on a distributed environment using the --only-group flag, but it doesn't actually run tests on a distributed environment. So you have to do some lifting yourself to get the tests running on a distributed environment. You could run all of your tests on multiple machines like so:

  1. Use net-ssh to ssh into each one of your boxes.
  2. Use each ssh session to run your parallel_tests script (which should break the tests up and run them in parallel on the current box -- just don't use the --only-group option as described here)
Michael Frederick
  • 16,664
  • 3
  • 43
  • 58