These demonstration scripts allow you to run an automated Appium tests on Sauce Labs platforms.
The code in these scripts 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. These scripts are provided for educational and demonstration purposes only, and should not be used in production. Issues regarding these scripts should be submitted through GitHub. These scripts are maintained by the Technical Services team at Sauce Labs.
Some examples in this repository, such as
appium-examples
andheadless-examples
, may require a different account tier beyond free trial. Please contact the Sauce Labs Sales Team for support and information.
-
Set Global Dependencies
$ brew install ruby
- Install Rake
$ gem install rake
- Install bundler (Sudo may be necessary)
$ gem install bundler
-
Set 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>
-
Set Project Dependencies
- Install packages (Use sudo if necessary)
$ bundle install
- Navigate to the
Rspec
directory:- for running tests on emulators and simulators:
emusim
- for running tests on real devices:
rdc
- for running tests on emulators and simulators:
- Navigate to either the
android
orios
directory. - Run the following command to run tests in Parallel:
$ rake test_sauce
- Visit the Sauce Labs Dashboard to see the results.
There may be additional latency when using a remote webdriver to run tests on Sauce Labs, therefore timeouts or "Waits" may need to be increased. Please read the following wiki page on tips regarding explicit waits