Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ruby Example Tests

Important Disclaimer

This code is provided on an "AS-IS” basis without warranty of any kind, either express or implied, including without limitation any implied warranties of condition, uninterrupted use, merchantability, fitness for a particular purpose, or non-infringement. Your tests and testing environments may require you to modify this framework. Issues regarding this framework should be submitted through GitHub. For questions regarding Sauce Labs integration, please see the Sauce Labs documentation. This framework is not maintained by Sauce Labs Support.

Purpose

Use this project only if you have experience setting up frameworks in Ruby, ideally these examples would be incorporated in an existing project you would like to adapt to run on Sauce Labs.

If you do not have an existing project and would like to use Ruby, it is recommended to look at the Watir Examples. If this is specifically for a Rails project and the developers who will be creating and implementing the new project have experience with Capybara, it is recommended to look at the Capybara Examples

Technologies demonstrated in this project:

RSpec

  1. Pass Information to Saucelabs
  2. Execute Tests in Parallel
  3. Integrate with Applitools

Cucumber

  1. Pass Information to Saucelabs
  2. Execute Tests in Parallel
  3. Integrate with Applitools

Appium for iOS

  1. Spec Examples
  2. Feature Examples
  3. Parameter Examples

Appium for Android

  1. Spec Examples
  2. Feature Examples
  3. Parameter Examples

Selenium for Desktop Browsers

  1. Spec Examples
  2. Feature Examples
  3. Parameter Examples

Requirements to Run These Examples (OSX/MacOS)

  1. Global Dependencies

    $ brew install ruby
    
    $ gem install rake
    
    • Install bundler (Sudo may be necessary)
    $ gem install bundler
    
  2. Sauce Credentials

    • In the terminal export your Sauce Labs Credentials as environmental variables:
    $ export SAUCE_USERNAME=<your Sauce Labs username>
    $ export SAUCE_ACCESS_KEY=<your Sauce Labs access key>
    
  3. Project Dependencies

    • Install packages (Use sudo if necessary)
    $ bundle install
    
    • Set Build ID (Optional)
    $ export BUILD_TAG=sauce_automated_build_name
    

Running Tests

  1. Run RSpec specs on Sauce in Parallel:

    $ bundle exec rake test_rspec
    
  2. Run Cucumber Features on Sauce in Parallel:

    $ bundle exec rake test_cucumber
    
  3. Execute Tests on Sauce in Parallel using an environment variable:

    $ TEST_RUNNER=rspec bundle exec rake
    

View the results on your Sauce Labs Dashboard

Contributing

This project is open source! The maintainers welcome the community to submit an issue with ideas or bug reports, and making pull requests with bug fixes and suggested code improvements

License

This project is available under the terms of the MIT License.

Additional Resources

  • A great resource to search for issues not explicitly covered by documentation.

About

Example code for running your test suite with Sauce Labs

Resources

Stars

5 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages