Skip to end of metadata
Go to start of metadata

Before Running Your Test

Testing on Real Devices

In addition to testing on emulators and simulators, you can also test your mobile applications on real devices. Be sure to read the requirements for real devices in Requirements for Android and iOS Mobile Application Testing. You can also check out an example of a mobile application test script for an iOS real device in Instant Appium Python iOS Real Device Tests.

Setting Up Your Test

  1. 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. 

  2. 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

  3. 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 

  1. 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.  

  2. 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