Mobile App Storage
When testing mobile apps, you have the option to upload your app to our app storage. The benefits of app storage include:
- Uploading all of your mobile apps to the same location for cross-device automated and live testing with virtual devices and real devices.
- Sharing your uploaded apps with your team members.
- Storing apps for up to 60 days.
- App Storage supports app files in _.apk, _.aab, _.ipa, or _.zip format, up to 4GB.
Executable files (.exe) are not supported.
Make sure you have a debuggable AND non-obfuscated version of your application uploaded to Mobile App Storage to leverage all of our capabilities like Biometrics, Image injection, or Mobile App Diagnostics.
What You'll Need
- A Sauce Labs account (Log in or sign up for a free trial license).
- Your Sauce Labs Username and Access Key.
- Your mobile app file. If you don't have one on hand, consider using our Demo Apps:
Rate Limiting
To increase service stability and prevent overload by a high volume of incoming traffic, we have set the following rate limits for uploading your mobile apps (effective from 14.11.2022):
Trial Users | Non Trial Users | |
---|---|---|
Uploads |
|
|
Uploading Apps via UI
For information about using the Sauce Labs UI to upload your mobile file to app storage, see Uploading an App.
Uploading Apps via REST API
You can upload your mobile app programmatically using the File Storage API Methods. The API endpoints are Data center-specific, so make sure you are using the endpoint that is applicable for your account data center, as shown in the following example requests.
Considerations
When using the cURL sample requests below, consider the following:
- The
<path/to/your/file>
variable must include the file itself, including the file extension. - The
<filename.ext>
variable is the portion of the path that is just the file itself and must also include the file extension. Otherwise, the upload will succeed, but your app will not be accessible to your tests. - The
$SAUCE_USERNAME:$SAUCE_ACCESS_KEY
variable assumes you have set your Sauce Labs credentials as environment variables.
- US West
- US East
- Europe
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request POST 'https://api.us-west-1.saucelabs.com/v1/storage/upload' \
--form 'payload=@"<path/to/your/file>"' \
--form 'name="<filename.ext>"'
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request POST 'https://api.us-east-4.saucelabs.com/v1/storage/upload' \
--form 'payload=@"<path/to/your/file>"' \
--form 'name="<filename.ext>"'
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request POST 'https://api.eu-central-1.saucelabs.com/v1/storage/upload' \
--form 'payload=@"<path/to/your/file>"' \
--form 'name="<filename.ext>"'
Installing Apps from a Remote Location
Real Devices Only
If your app is downloadable from a remote location (e.g., AWS S3 bucket, a GitHub repository), you can provide a URL as the value for the app
capability in your test, which will install the app onto the real devices prior to test execution.
Appium cannot log into secure locations, so apps installed via remote download must be accessible, so are then removed from the real device immediately following test completion, providing an added layer of security.
To install a remote app on a real device for a test:
- Make sure the app meets the requirements for Android and iOS Mobile App Testing.
- Ensure Sauce Labs has READ access to the app URL.
- In your Appium test script, enter the app file location URL as the
app
desired capability:
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");
Android:
- The Instrumentation feature will not work if the app is installed from an external location.
iOS:
- The app cannot be installed on public devices due to signing.
- The app can be installed on private devices. However, to make this work you must add the UDID of the private device to the provisioning profile for iOS (see our resigning process to learn more).
- The Instrumentation feature will not work if the app is installed from external location.