Skip to content

jgendr2/sauce_ruby

 
 

Repository files navigation

Sauce for Ruby

Build Status Dependency Status

This is the Ruby client adapter for testing with Sauce Labs, a Selenium-based browser testing service.

There is more information on the wiki, so be sure to look there for information too!

Installation

    % gem install sauce

Suggested Toolchain

The Sauce gem has been optimized to work most effectively with Cucumber and Capybara.

To get started with Sauce and Cucumber, install the appropriate gem:

    % gem install sauce-cucumber

And then read more how to get started with Cucumber and Capybara on this wiki page.

Running on against a list of browsers

To run against a list of browsers, you need to configure them:

Sauce.config do |c|
  c.browsers = [
    ["windows","firefox","18"],
    ["windows","opera","11"]
  ]
end

Then, depending on your test framework:

RSpec 2

Place your specs in the spec/selenium folder

RSpec 1

Give your tests a :type of :selenium, eg describe Aioli, :type => :selenium do

Tests will be run against each combination, sequentially and automagically.

Contributing to the Gem

  • Fork the GitHub project
  • Create a branch to perform your work in, this will help make your pull request more clear.
  • Write some RSpec tests to demonstrate your desired capability or exhibit the bug you're fixing.
  • Make your feature addition or bug fix.
  • Commit
  • Send a pull request! :)

Testing the Gem

Running the full test suite will require RVM

  • Set SAUCE_USERNAME and SAUCE_ACCESS_KEY in your environment to valid Sauce credentials or create an ondemand.yml in the following format:

      access_key: <yourkeyhere>
      username: <yourusernamehere>
    
  • Invoke bundle install to install the gems necessary to work with the Sauce gem

  • Running rake spec:unit will run the RSpec unit tests

  • If you'd like to run the entire test suit, rake test will run all the integration tests, but requires the Sauce credentials to be set up properly as these tests will run actual jobs on Sauce.

About

This is the Ruby client adapter for testing with Sauce Labs, a Selenium-based browser testing service (saucelabs.com).

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 97.8%
  • Shell 1.6%
  • JavaScript 0.6%