The mobile application you want to test must be in a location that is accessible over the Internet so the Sauce Labs virtual machines that are running your testing simulators/emulators can download it. We recommend that you use our secure Sauce Storage for this purpose, but you may have situations in which you want to host your application in a different location. 

If the web application you want to test is behind a firewall or on localhost, you can use a secure Sauce Connect tunnel to establish the connection with Sauce Labs.  

  1. Make sure your application meets the Requirements for Android and iOS Mobile Application Testing.
  2. Upload your application to the hosting location.
  3. In your test, set the value for app in the desired capabilities to reference the hosting location and application file, like this:

    DesiredCapabilities caps =;
    caps.setCapability("appiumVersion", "1.4.16");
    caps.setCapability("deviceName","Android Emulator");
    caps.setCapability("deviceOrientation", "portrait");
    caps.setCapability("browserName", "");

If you create your iOS application as a .app directory with multiple files, you need to export it as a .zip file before uploading. If you have created your app as a .ipa file, you can upload that file directly without needing to zip it up.