Skip to main content
Introducing the Automate SDK! Get your entire test suite running on BrowserStack in minutes! Learn More.

Run Tests in Parallel

Run multiple Ruby Cucumber tests in parallel on BrowserStack Automate

Note: Code samples in this guide can be found in the cucumber-browserstack sample repo on GitHub

On BrowserStack, you can run multiple Cucumber tests at the same time across various browser, device and OS combinations. This is called Parallel Testing. Parallel Testing gives you the same benefits as running a multi-threaded application.

With Parallel Testing, you can run the same test on different browser/device combinations i.e. cross-browser testing, or run different tests on the same or different browser/device combinations. Parallel Testing will help you reduce the run time of your test suite, resulting in faster build times and faster releases.

Run sample test in parallel

  1. Clone the cucumber-ruby-browserstack sample repository on GitHub using the following command:

    git clone https://github.com/browserstack/cucumber-ruby-browserstack.git
    cd cucumber-ruby-browserstack
    
  2. Install the required dependencies to run your Cucumber tests on BrowserStack using the following command:

     bundle install
    
  3. Use the parallel_cucumber command and add the -n option to specify the number of parallel processes as shown in the following command:

     parallel_cucumber BROSWERSTACK_USERNAME=YOUR_USERNAME BROWSERSTACK_ACCESS_KEY=YOUR_ACCESS_KEY BS_AUTOMATE_OS=Windows BS_AUTOMATE_OS_VERSION=<os-version> SELENIUM_BROWSER=<browser-name> -n 5
    

    In the command, set the OS-browser combination to run the test with 5 parallel processes. You can check out our capability builder and select from a wide range of custom capabilities that BrowserStack supports.

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback!

Talk to an Expert
Talk to an Expert