Skip to content

Use Sauce Labs Platform to Run Feature

vicwin edited this page Feb 20, 2012 · 1 revision

Sauce Labs is awesome on providing runner on different combinations of OS and Browsers types and versions. The following setup steps allow you to run your Cucumber Capybara feature on their platform easily.

  • Register an account in Sauce Labs. It is free and they give you 200 free mins per month for testing.
  • Once you have the user name and api key, open the <WARDEN HOME>/config/sauce_connect_config.rb file and filled in your credentials
  • set config.enable_tunneling to true if you are testing web site hosting on your local workstation or behind a firewall. This will enable Sauce Connect Tunnel for their runners to talk to your workstation. if you are testing website on the internet, you really don’t need it and keep the setting to false to speed up your start-up time.
  • Open the <WARDEN HOME>/config/env.rb file and change the default driver config.default_driver
    to config.default_driver = :sauce to use the “:sauce” driver.
  • Run your cucumber feature like you normally do. if you are seeing output similar to these:

    Feature: Users should be able to search based on keyword or reference code
    Background: # Search.feature:3
    [Connecting to Sauce OnDemand (path file: sauce_connect_patch.rb)…]
    Job URL: https://saucelabs.com/jobs/e23edba3161da2863f692453bb749278
    Given The user has changed to the default test target environment for the test application # /Users/victor/work/warden_fw/lib/lib_steps.rb:31
  • Congratulation! you are using Sauce Labs’s platform to run your features.