Skip to end of metadata
Go to start of metadata

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 reach 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. 

Using Sauce Connect for Testing Behind the Firewall or on Localhost

If the 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 = DesiredCapabilities.android();
    caps.setCapability("appiumVersion", "1.4.16");
    caps.setCapability("deviceName","Android Emulator");
    caps.setCapability("deviceType","phone");
    caps.setCapability("deviceOrientation", "portrait");
    caps.setCapability("browserName", "");
    caps.setCapability("platformVersion","5.1");
    caps.setCapability("platformName","Android");
    caps.setCapability("app","http://mycorp.intranet/myapp.apk");

iOS .app Applications Must be in a .zip File

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.

  • No labels