Page tree
Skip to end of metadata
Go to start of metadata

Experitest cloud platform provides additional application capabilities for your Appium based tests.

These capabilities give you better control over the state of the application before a tests is run.

NameDescription
app

The path to the application files, which would be installed and launched

  • Optional - To install cloud apps with unique name use this syntax:

    //app capability:
    cloud:uniqueName=<value>
    
    // To support iOS app you should also add the capability 'bundleId'
    // To support Android app you should add the'appPackage' and the 'appActivity' capabilities

    (Upload app to cloud with a unique name)

instrumentApp

Instrument the application.

Default: false

noReset
  1. Launch the application without killing it before (when the capabilities bundleID (iOS) or packageName+activityName (Android) are provided
  2. Not kill/close the application on driver quit (when the capabilities bundleID (iOS) or packageName+activityName (Android) are provided
  3. Stay on the application and not go to Home screen on driver.quit
  4. Not clear application data (android only)
  5. The application is not reinstalled no matter the versioning (it overrides the parameter installOnlyForUpdate)
fullReset 

Uninstall the application completely before installing it again.

Relevant only when the app capability specified.

Upon test completion, the application will be uninstalled (driver.quit()).

When appears with noReset = true the application will stay on the device at the end of the test (when app capability is provided)

When appears with noReset = false the application will not be uninstalled at the beginning, only at the end of the test (when app capability is not provided)

Default: false

applicationClearData

Clears the application data. See application clear data for more information

When one of noReset or fullReset or both is set true, then applicationClearData will have no effect.

Default: false

autoWebview

Moves application into web view context.

appBuildVersion
(formerly appVersion)

Used only when installing a cloud application. Specifies the application build version for installation.

appReleaseVersionUsed only when installing a cloud application. Specifies the application release version for installation.

installOnlyForUpdate
(formerly install.only.for.update)

Install the application only if the desired version is different from the application version on the device (or if the app does not exist on the device). Otherwise, keep the application on the device.

That will greatly improve session creation time for testings on the same application version

The following desired capability must also be specified if using this feature:

  • At least one of 2 new capabilities have to be provided “appReleaseVersion” or “appBuildVersion(formally appVersion), then

    1. If only “appReleaseVersion” is provided
      - application will not be installed if there is an application with same release version is installed on device

    2. If only “appBuildVersion” (formally appVersion) is provided
      - application will not be installed if there is an application with same build version is installed on device

    3. If both “appReleaseVersion” and “appBuildVersion” (formally appVersion) are provided
      - application will not be installed if there is an application with same release version AND with same build version is installed on device.

    4. When no “appReleaseVersion” nor “appBuildVersion” (formally appVersion) is provided for application
      - application should not be installed and an exception is thrown.

  • 'bundleId' for iOS only
  • 'appPackage' and 'appActivity' for Android only

The installation of the package on the device will happen in the following cases:

  1. if the application is already installed on the device and the version different than the one specified by appBuildVersion and/or appReleaseVersion. the desired version will be installed
  2. noReset  is true - overrides the version check and follow the behavior of noReset
  3. fullReset is true - overrides the version check and follow the behavior of fullReset


iOS Example
dc.setCapability(MobileCapabilityType.APP, "cloud:com.experitest.ExperiBank");
dc.setCapability(IOSMobileCapabilityType.BUNDLE_ID, "com.experitest.ExperiBank");
dc.setCapability("appBuildVersion", "2.23");
dc.setCapability("installOnlyForUpdate", true);
Android Example
dc.setCapability(MobileCapabilityType.APP, "cloud:com.experitest.ExperiBank/.LoginActivity");
dc.setCapability(AndroidMobileCapabilityType.APP_PACKAGE, "com.experitest.ExperiBank");
dc.setCapability(AndroidMobileCapabilityType.APP_ACTIVITY, ".LoginActivity");
dc.setCapability("appBuildVersion", "4352");
dc.setCapability("appReleaseVersion", "1.01");
dc.setCapability("installOnlyForUpdate", true);



Set Experitest Url

Please make sure you replace <EXPERITEST_URL> with appropriate URL in the sample code's below.

Android Only

NameDescription
noReset

Don't reset app state before this session.

Default false.

appPackage

package name of the activity for launch

appActivity

activity name to launch

autoGrantPermissionsGrants permissions required by the application on install
Java
// Install Android application from path and launch it on the device
// You'll need to upload the application to the cloud as a prerequisite

DesiredCapabilities dc = new DesiredCapabilities();
dc.setCapability(MobileCapabilityType.APP, "cloud:com.experitest.eribank/com.experitest.ExperiBank.LoginActivity");
dc.setCapability("instrumentApp", true);
dc.setCapability(MobileCapabilityType.FULL_RESET, true);
dc.setCapability("dontGoHomeOnQuit", true);
driver = new AndroidDriver<>('<EXPERITEST_URL>', dc);
Python
dc = {}


....
....

self.dc['platformName'] = 'android'
self.dc['app'] = 'cloud:com.experitest.eribank/com.experitest.ExperiBank.LoginActivity'
self.dc['instrumentApp'] = True
self.dc['fullReset'] = True
self.dc['dontGoHomeOnQuit'] = True
self.driver = webdriver.Remote('<EXPERITEST_URL>', self.dc)



C Sharp
// Install Android application from path and launch it on the device
DesiredCapabilities dc = new DesiredCapabilities();
dc.SetCapability(MobileCapabilityType.App, "cloud:com.experitest.eribank/com.experitest.ExperiBank.LoginActivity");
dc.SetCapability("instrumentApp", true);
dc.SetCapability(MobileCapabilityType.FullReset, true);
dc.SetCapability("dontGoHomeOnQuit", true);
driver = new AndroidDriver<>('<EXPERITEST_URL>', dc);


iOS Only

NameDescription
bundleId
iOS application identifier
Java
// iOS - launch pre-installed application and switch context automatically into webview
DesiredCapabilities dc = new DesiredCapabilities();
dc.setCapability(MobileCapabilityType.APP, "cloud:com.experitest.ExperiBank");
dc.setCapability(MobileCapabilityType.AUTO_WEBVIEW, true);
driver = new IOSDriver<>('<EXPERITEST_URL>', dc);
Python
dc = {}

....
....

self.dc['platformName'] = 'ios'
self.dc['app'] = 'cloud:com.experitest.ExperiBank'
self.dc['autoWebview'] = True

self.driver = webdriver.Remote('<EXPERITEST_URL>', self.dc)



C Sharp
// iOS - launch pre-installed application and switch context automatically into webview
DesiredCapabilities dc = new DesiredCapabilities();
dc.setCapability(MobileCapabilityType.App, "cloud:com.experitest.ExperiBank");
dc.SetCapability(MobileCapabilityType.AutoWebView, true);
driver = new IOSDriver<>('<EXPERITEST_URL>', dc);


Start Test without Launching An Application

In order to start the test, you should omit the app capability and the application ID capabilities (bundleId/appPackage + appActivity).


Java
DesiredCapabilities dc = new DesiredCapabilities();
driver = new AndroidDriver<>('<EXPERITEST_URL>', dc);
Python
dc = {}
self.dc['platformName'] = 'android'
self.driver = webdriver.Remote('<EXPERITEST_URL>', self.dc)
C Sharp
DesiredCapabilities dc = new DesiredCapabilities();
driver = new AndroidDriver<>('<EXPERITEST_URL>', dc);


  • No labels