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

Testing on Internal Networks

Run Ruby Cucumber tests on your privately hosted websites using BrowserStack Automate

BrowserStack enables you to run your Cucumber automated tests on your internal development environments, on localhost, and from behind a corporate firewall. This feature is called “Local Testing”.

Local Testing establishes a secure connection between your machine and the BrowserStack cloud. Once you set up Local Testing, all URLs work out of the box, including HTTPS URLs and those behind a proxy or firewall.

Note: Code samples in this guide can be found in the cucumber-browserstack sample repo on GitHub
  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. Set the browserstack.local capability to true in the Cucumber config file cucumber-ruby-browserstack/features/support/env.rb.
  4. Run the following command to run your Cucumber test using BrowserStack Local:

     cucumber BROWSERSTACK_USERNAME=YOUR_USERNAME BROWSERSTACK_ACCESS_KEY=YOUR_ACCESS_KEY BS_AUTOMATE_OS=Windows BS_AUTOMATE_OS_VERSION=10 SELENIUM_BROWSER=Chrome
    

    In the command, we’ve specified the test to run on Chrome on Windows 10. 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
Download Copy Check Circle