The Sauce Labs Cookbook

Sauce Headless

Front End Performance Testing

Insights

External Resources

More Info


Page tree
Skip to end of metadata
Go to start of metadata

Please select your preferred method for uploading your application in order to view the instructions:

  1. Log in to Sauce Labs and select LIVE from the options in the left-hand navigation.
  2. Select Mobile-App.
  3. You will see a list of previously uploaded apps.
  4. To the right of the page, select App Upload to upload a new application (Note: Live Testing on Real Devices only at the moment):

There may be situations where you want to install an application from a downloadable remote location (AWS S3 bucket, a GitHub repository, etc.). The application is completely removed from the real device after the test completes, providing an added layer of security for your application. Please review the following guidelines below before uploading your application:

Please review the following guidelines below before uploading your application:

  1. Make sure your application meets the prerequisite requirements for Android and iOS Mobile Application Testing.
  2. Upload your application to the hosting location.
  3. Ensure Sauce Labs has READ access to the app URL.
  4. In your Appium test script, enter the URL for the application as the "app" desired capability. Below is an example Java snippet:

    Example Java Snippet
    caps.setCapability("app", "https://github.com/saucelabs/sample-app-mobile/releases/download/2.3.0/Android.SauceLabs.Mobile.Sample.app.2.3.0.apk?raw=true");

Installing your Application on Private Devices

In some cases you may need to upload / install your application to a private device and also prevent the device from broad internet access while under test. The steps to achieve this are:

  • Upload your application to an internal git repository, or private hosting solution with the necessary permissions (e.g. Amazon S3 with a strict bucket policy).
  • Ensure the hosted app URL is available to the machine running the automated test.
  • Ensure that you've enabled the "Require Sauce Connect/VPN" setting in your organization's security settings.


Each Session is a "Fresh" Install

You will not be able to access information about different versions of your application because each session includes a "fresh" installation of your application. 

For Automated Appium Testing Only

You can only install remote applications for automated Appium testing. Espresso and Robotium automated tests are not supported. Live Testing is also not supported.

Application Storage

Here is an example of how to upload an application to Application Storage in the US West Data Center:

Mac OSX / Linux Example
$ curl -F "payload=@/Users/$SAUCE_USERNAME/Downloads/$FILE_NAME.ipa" -F "name=$FILE_NAME.ipa" -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY"  'https://api.us-west-1.saucelabs.com/v1/storage/upload'

For examples of how to access the application in your automated test builds and more detailed information on how to use the Storage API, visit the Application Storage page.


Sauce Temporary Storage

Here is an example of how to upload an application to Sauce Temporary Storage:

MacOS/Linux Example
$ curl -u $SAUCE_USERNAME:$SAUCE_ACCESS_KEY -X POST -H "Content-Type: application/octet-stream" \
"https://saucelabs.com/rest/v1/storage/$SAUCE_USERNAME/$APP_NAME?overwrite=true" --data-binary @path/to/your_file_name

For more examples and more detailed information, visit the Sauce Temporary Storage page.