RSpec

DESCRIPTION:

SauceTest lets you run your Selenium tests on Sauce Labs cloud unchanged.

sauce_test is command line utility you can use or create rake task and run your tests in parallel

SYNOPSIS:

  1. create new rake task, should look like that:

only ‘files’ field is mandatory

require ‘rubygems’ require ‘rake’ require ‘sauce-test/rake/tasks’

SauceTest::Rake::RSpecTask.new do |t|

t.files = 'spec/**/*_spec.rb'  # Dir.glob pattern

t.browsers = [{'os' => "Linux", 'name' => "firefox", 'version' => 3},
              {'os' => "Windows 2003", 'name' => "iexplore", 'version' => 7}]

t.workers = 4                 #workers per browser

t.report = 'path_to/report'
t.config = 'config/sauce.yml'

end

  1. create sauce.yml file in config dir. if you like to use different dir/file make sure that SAUCE_CONFIG env variable contains path to config file. . example sauce.yml

    login: user
    key: ff487724-2sfe-4a50-8365-sc750f2d875f
    timeout: 180 #optional but advised to be at least 90 sec
    
  2. rake sauce:spec

INSTALL:

[sudo] gem install rspec