Skip to end of metadata
Go to start of metadata

Both iOS and Android have specific requirements for being able to run mobile native and hybrid application testing on Sauce. 

iOS Requirements

 

iOS Simulators: Zip it up!

Before you upload your iOS app to the location you want to test it from, you must package it as a .zip file.

  • After you've compiled your application, zip it into a .zip archive and make sure that the zip archive only contains your app directory
  • Before the test starts, upload the zip archive to a public location or Sauce Storage.
    • If you're using Sauce Storage, get the returned location, which will look something like sauce-storage:myApplication.zip
  • In the test capabilities, specify the app as the location of the zip file

iOS Real Devices

Testing iOS applications on real devices is a little different:

  • The mobile application must be compiled in debug mode. If it isn't, we won't be able to automate it.

  • You will need to use XCode to compile and "archive" your app to run on a real iOS device
    Your setup may vary, but this often works: in XCode 7 or greater, make the scheme target Generic iOS Device, and then select Product > Archive from the menu. Export that archive as an .ipa file, and save it with either Development Deployment or Ad-Hoc Deployment.

    Apple may change this interface in the future, so be sure to check the appropriate documentation. If your developers have specified more complex "schemes" to create your apps, you may also need to consult with them to compile and archive the app correctly.

  • You must upload your app to Sauce Storage. You cannot use another public location to store real device apps.
    • Before the test starts, upload this archive to Sauce Storage. Obtain the sauce-storage URL from the API.
      For example, if your app was called myApplication.ipa, the URL will look something like sauce-storage:myApplication.ipa.
       
  • Make sure your test capabilities work for a real device
    • deviceName: should be a valid name for a real device. A real device deviceName always has a model name and ends in "Device", like "iPhone 6 Device". The topic on desired capabilities for mobile testing contains some examples. 
    • app: should be the location of the .ipa file in Sauce Storage, such as sauce-storage:myApplication.ipa.

Android Requirements

Apk it up!

Before you upload your Android app to the location you want to test it from, you must package it as a .apk file.

  1. After you've compiled your application, export the Android project from your development environment to create the .apk file. This StackOverflow article contains instructions on how to build an .apk file in Eclipse.
  2. Before the test starts, upload the .apk file to a public location or Sauce Storage.
  3. In the test capabilities, specify the location of the .apk file, or the sauce-storage:app.apk URL as described in the topic on Temporary Sauce Storage .

Requirements for Testing Android Applications on Real Devices

Testing Android applications on real devices has these additional requirements:

  • In the test capabilities, specify the deviceName with a valid name for a real device. A real device deviceName always has a model name and ends in "Device", like "Samsung S4 Device" or "Samsung S5 Device". The topic on desired capabilities for mobile testing contains some examples. 
  • If your app uses native code (for instance, you wrote parts in C++ rather than Java, or access native libraries), make sure you compile it for a real device.