Skip to main content

Live Mobile App Testing

With Sauce Labs, you can test your mobile apps on a variety of Android and iOS/iPadOS devices. If you do not have an app, consider using the Sauce Labs demo app for validating your account functionality as well as your tests.

What You'll Need

Uploading an App

You can upload your app via the Sauce Labs UI or via the REST API. For information about uploading via the API, see Upload Files with the REST API.

To upload an app via the Sauce Labs UI:

  1. On Sauce Labs, in the left panel, click App Management.
  2. To upload an app you can either drag and drop an app or browse for and select the file. We currently support *.apk Android app files, *.aab Android App Bundle files, and *.ipa or *.zip iOS app files (*.zip files are parsed to determine whether a valid *.app bundle exists). Non-app file uploads are not supported in the UI at this time, but can be uploaded through the API.

If you don't have an app to test, you can use the Sauce Labs sample mobile app.

Upload an app

Deleting an App

Deleting an app in Sauce Labs will delete the whole app (i.e., the group of builds belonging to the same app package). Files associated with app identifiers (i.e., belonging to the same platform and accessible to the same team) are indicated by the + symbol next to the version number. Also, the version number shown is the most recently updated file, not necessarily the latest version of the app.

To delete an app, on the App Management page, hover over the app and then click Delete.

Delete an app

App Settings

To view or change the app settings, on the App Management page, hover over the app and then click Settings.

App settings

To easily copy a test's file name or ID, hover over the test and then click the clipboard icon.

Copy a file name or ID
note

The app settings screen is only available for real device testing.

To view your recent configurations, click Recents.

Recent tests

Default App Settings

SettingDescription
Device LanguageUse the dropdown to select the device language. The language selector will tell your application that the locale of the device and region is set to the selected parameter. You won't need to change the language of the OS manually during a session inside iOS/Android settings. For more information about the locale setting, see the documentation for iOS and Android.
Device OrientationUse the dropdown to set the device orientation (Landscape or Portrait).
ProxyEnable/disable the use of a proxy. Enter the Hostname and Port and then click Update.
Device Passcode

Real Devices Only

Enable/disable the device passcode for your apps. If your app requires a device passcode/screenlock to launch, you can enable this setting to run your tests on a passcode-protected device. On Android we are setting 000000, on iOS 089675 as passcode. This is available during Live Testing sessions, see it below in the Live Testing interface section.
InstrumentationEnable/disable device instrumentation. Enabling allows you to use advanced features when testing your app in the real device cloud, like image injection and taking screenshots of secure views.
Image InjectionEnable/disable image injection. Image injection allows you to mimic camera behavior when testing apps by letting you upload an image and present it to the app as if it were read by the device camera.
Bypass Screenshot Restriction

Android Only

Enable/disable Bypass Screenshot Restriction (not supported on apps uploaded to the legacy sauce storage). If you're testing Android mobile apps on Sauce Labs and see a black screen in your live testing session, you might need to enable the Bypass Screenshot Restriction. This allows Sauce Labs to work around a setting on those apps that prevents screenshots or videos from being taken. However, there are other details to keep in mind. To effectively test apps that have this setting, see Bypass Screenshot Restriction.
System Alerts Display

iOS Only

Enable/disable a system alerts delay. Enabling delays alerts, such as asking for permission to access the camera, to prevent app crashes at startup.
Biometrics InterceptionEnable/disable biometrics. Enabling allows you to choose authentication options if your mobile app requires a biometric authentication, such as fingerprint or face recognition on Android, and Face ID or Touch ID on iOS.
This setting is disabled by default for iOS apps.
Group Folder Redirect

iOS Only

Enable/disable a group directory redirect. Enabling allows you to use your app's private app container directory instead of the shared app group container directory. When your app gets resigned, the shared directory is not accessible.
note

Any changes you make to the app settings will affect all uploaded versions of the app.

Example Settings - iOS

App settings - iOS

Example Settings - Android

App settings - Android

Most settings update automatically, however, when you make changes to the proxy setting, click Update to finish.

Selecting a Device

You must select a device prior to launching a session.

On the App Management page, hover over the app you want to test and then click Start Test.

Choose a device

The device selection page will open, with the option to test on a real device or a virtual device.

note

If you are testing an iOS app, the device selection will only display the type (real/virtual) configured on the app.

To mark a device as a favorite so you can find it easily in the future, click the pin icon next to the device name.

Favorite a device

The default sorting for the device list is Pinned First.

Real Devices

On the device selection page, click the Mobile Real tab. Use the search box and filters to find the device you want to test on, or select the device in the grid.

Mobile Real tab

Virtual Devices

On the device selection page, click the Mobile Virtual tab. Use the dropdowns to select the details for the virtual device you want to test on, and then click Start Test.

Mobile Virtual tab

Public vs. Private Devices

There is a distinction between Public Devices and Private Devices.

  • Public devices are accessible by anyone with a Sauce Labs account and are subject to availability. If a device is in use, you will see a yellow In Use flag across the thumbnail.
Busy public device
  • Private devices are associated with your account and are an enterprise only feature. Private devices are indicated by a green device icon.
note

If you are interested in upgrading to an enterprise plan, contact your Sauce Labs Sales Engineer or Customer Success Manager.

Launching a Test

You can launch a test from the following screens:

  • Hover over the device in the grid and then click Start Test.
  • Hover over the device in the grid and then click Details. On the Details screen, click Start Test.
caution

If you have issues starting live tests, check your IT infrastructure and make sure you are not blocking WebSockets.

Launch a test from the Details screen

You'll see a loading screen, and then the app will launch in a live test window using the device you selected.

Mobile real device test interface

Time Limits and Timeouts for Real Devices

  • Live tests for free users have a 10 minute limit from session start
  • Live tests for all other users are limited to six hours
  • Live tests for paid users will timeout after 15 minutes of inactivity

Trusting Enterprise Certificates

If you upload an app that is signed with an enterprise certificate, and Instrumentation is DISABLED in app settings, you must manually trust the certificate before it will successfully launch.

  1. If you receive an app installation failed error, click the X in the app loading screen to exit the device home screen.
  2. On the device home screen, navigate to Settings -> General.
  3. Under Profiles & Device Management, tap the app you are trying to install and test.
  4. Tap Trust "app name" and then tap Trust.
  5. Reopen the app to continue the test.

Adding a Test Name and Outcome for Your Test

Sauce Labs has introduced a new feature that allows you to enter a test name and test status (passed/failed) for your Live Tests after cross-browser and mobile app testing. This update enhances the testing efficiency by enabling you to add more context to test descriptions and add more clarity to your test repository.

Adding a test name is a straightforward process, and there are two ways to do it:

  1. From the end session screen:

    • Start a Live Test session.

    • End the Live Test Session by clicking on the End button from the toolbar. The end session screen will pop up, and from there, you can edit the test name and select test outcome status:

      Test Name
  2. From the test details page:

    • Go to Live -> Test results -> click on a test.
    • On the test details page, click on the pencil nearby the test name to edit it: Test Name
note

This feature works the same way for both cross-browser testing and mobile app testing.

Use test names to customize your testing experience:

  • Add descriptive names to your tests to quickly identify your findings.
  • Keep track of tested steps by adding details to test names.
  • Easily rename your tests to reflect Jira tickets or other related tasks.
LIMITATIONS

This feature has a constraint on the maximum allowable length of the test name, which is limited to 255 characters. The utilization of emojis is not supported in the test name.

Live Test Interface

IconNameDescription
Unpin/Pin Toolbar iconUnpin/Pin ToolbarUnpins or pins the live testing toolbar.
Session Info iconSession InfoOpens the Current Session window, which includes app and device details.
Take Screenshot iconTake ScreenshotTakes a screenshot of the current device screen. The image downloads automatically as a .png file.
Share Session iconShare SessionOpens the Share Device window. For a sharable link to the device, click Get Link.
Users must be logged in to be able to view the test.
Rotate Device iconRotate DeviceRotates the device between portrait and landscape.
Home iconHomeOpens the device home screen.
More Device Options iconMore Device OptionsSet Location - Set the GPS location using coordinates or by dropping a pin on the map.
Camera Injection - Opens the Camera Injection window. See Camera Image Injection for more information.
Biometric Injection - Opens the Biometric Authentication window.
Performance mode On/Off - Enables you to increase frame rate per second, or switch back to lower frame rate video streaming, when your network connection or VPN is restrictive and you experience blurred screen.
Restart App iconRestart AppRestarts the app.
Switch App Version iconSwitch App VersionOpens the Switch App Version window. To change the version of the app you are testing, hover over the version and then click Choose version.
Clipboard iconClipboardOpens the Paste Content Into Device window.
Install Dependency iconInstall DependencyOpens the Install Dependent App window.
Developer Options iconDeveloper OptionsOpens the Developer Options panel, which includes the Device Log and Dev Tools tabs.
Developer Options iconMute/UnmuteMutes or unmutes audio for your testing session.
Passcode iconPasscode - Android OnlyIf your app requires a device passcode/screenlock to launch, you can enable this setting to run your tests on a passcode-protected device. On Android we are setting 000000.

Device Log

Device Log
IconNameDescription
Log LevelLog Level
  • VERBOSE
  • DEBUG
  • INFO
  • WARN
  • ERROR
  • ASSERT
App Log
  • VERBOSE
  • DEBUG
  • INFO
  • WARN
  • ERROR
  • ASSERT
Search Log iconSearch LogOpens the Search log interface. Enter a term or terms in the search box and select or deselect the following checkboxes as necessary:
  • REGEX
  • IGNORE CASE
  • INVERT
Pause Log iconPause LogPauses the log feed.
Wrap Text iconWrap TextWraps text in the log for easier reading.
Clear Log iconClear LogClears the log feed.
Download Log iconDownload LogDownloads the log as a .txt file.

Changing an App Version

Sometimes you need to conduct A/B testing, or document and validate feature parity between different versions of the same app. You can change the app version, as well as the real device, and launch a new test session.

  1. On the App Upload page, click +# in the Version column. App with multiple versions
  2. On the Settings page, in the versions list, hover over the version you want to launch.
  3. Click Start Test. Change the version of an app