- The Platform Configurator
- Getting Started with Selenium for Automated Website Testing
- Getting Started with Appium for Mobile Native Application Testing
- Selenium Bootcamp by Dave Haeffner
- Appium Bootcamp by Dave Haeffner and Matthew Edwards
Before Running Your Test
- You need to have a Sauce Labs account
- You need an Appium test that you want to run against your application
- The application you want to test must meet the Requirements for Android and iOS Mobile Application Testing
- The application you want to test should be uploaded to Sauce Storage or some other location accessible over the Internet. This is so the Sauce Labs virtual machine that will run the emulator/simulator you want to use in your tests can connect to your application.
- If the application you want to test is on localhost or behind a firewall, you need to set up a Sauce Connect tunnel so the Sauce Labs virtual machine can connect to it
Testing on Real Devices
In addition to testing on emulators and simulators, you can also test your mobile applications on real devices.
IP Ranges and Data Center Endpoints Virtual Device Cloud: https://ondemand.eu-central-1.saucelabs.com/wd/hub
Sauce Labs has data centers in both the US and EU. You can access Sauce Labs services from either location by providing the appropriate URL endpoints, and whitelisting their associated IP ranges.
Sauce Connect Proxy: https://eu-central-1.saucelabs.com/rest
REST API: https://eu-central-1.saucelabs.com/rest/v1
18.104.22.168/21 (this is equivalent to the range
22.214.171.124 – 126.96.36.199)
188.8.131.52/21 (this is equivalent to the range
184.108.40.206 - 220.127.116.11)
IP Ranges and Data Center Endpoints
Virtual Device Cloud: https://ondemand.eu-central-1.saucelabs.com/wd/hub
Setting Up Your Test
- Set up your test to connect to Sauce Labs using your account credentials.
The exact configuration depends on your scripting language. Example Appium Scripts for Android Mobile Application Tests and Example Appium Scripts for iOS Mobile Application Tests include examples of how to incorporate your authentication credentials and establish the connection to Sauce Labs.
- Use the Platform Configurator to specify the Desired Capabilities of your test, including the path to your application in Sauce Storage or another location.
Desired Capabilities are the means by which you specify the combination of platform, operating system, and browser that you want to use in your tests, along with other test options. You can find out more about using Desired Capabilities in the topics under Test Configuration and Annotation, as well as in the Appium documentation. You can also check out some Examples of Test Configuration Options for Mobile Application Tests.
- Make sure your test is set up to report results to your Sauce Labs dashboard.
As with the case of setting up your authentication credentials, the exact reporting configuration depends on the language you're using in your test script. Example Appium Scripts for Android Mobile Application Tests and Example Appium Scripts for iOS Mobile Application Tests include examples of how to enable reporting for each language. You can also use the Sauce Labs REST API to annotate your tests after they have completed, including pass/fail status.
Running Your Test
- Log in to the Sauce Labs web interface.
You don't need to be logged in to run your test, but if you are you can watch your test run and the results appear in the dashboard.
- On your local machine, run your test script.
That's it! As your test script executes you'll see the results appear in your dashboard.
After Running Your Test
- Use the update_job method from our REST API to add tags, build numbers, pass/fail status, and more information to your completed test
- You can run multiple tests in parallel to accelerate your development pipeline
- You can integrate your tests on Sauce Labs with Jenkins, Bamboo, and other continuous integration/continuous delivery servers
- You can add more team members to your account so they can run tests with Sauce too