Skip to main content

Appium Server (Open Source) Execution

Continuous Testing Cloud supports Appium open-source execution when any Appium Tests are run.

To use Appium Open Source, use the capability appiumVersion.

Appium Version Capability

The appiumVersion capability specifies the version of Appium.

The currently supported versions are:

  • 1.22.3
  • 2.11.4
  • 2.12.1

Appium Version Desired Capability

dcIOS.setCapability("appiumVersion", "<version tag>");
dcIOS.setCapability("automationName", "XCUITest");
dcIOS.setCapability(MobileCapabilityType.PLATFORM_VERSION, "11.2.6");

Application Capability

MobileCapabilityType.APP is an existing capability that specifies the Cloud Application. It is extended to specify the application version.

It needs to follow the pattern provided below.

Cloud Application Desired Capability

dcIOS.setCapability(MobileCapabilityType.APP, "cloud:<Bundle ID>:<App version>");

For example:

Cloud Application Desired Capability Example

dcIOS.setCapability(MobileCapabilityType.APP, "cloud:com.experitest.ExperiBank:2435");

Complete Examples

Application Test Example

String MyDeviceUDID="1234567890ABCDEF";

dcIOS.setCapability("appiumVersion", "1.22.3");
dcIOS.setCapability(MobileCapabilityType.APP, "cloud:com.experitest.ExperiBank:2435");
dcIOS.setCapability("bundleId", "com.experitest.ExperiBank");
dcIOS.setCapability(MobileCapabilityType.PLATFORM_VERSION, "11.2.6");
dcIOS.setCapability("automationName", "XCUITest");
dcIOS.setCapability("deviceName", "auto");
dcIOS.setCapability("udid", MyDeviceUDID);
dc.setCapability("user", <user name>);
dc.setCapability("password", <password>);
dc.setCapability("testName", "My First Appium OSS Test");

Web Test Example

String MyDeviceUDID="1234567890ABCDEF";

dcIOS.setCapability("appiumVersion", "1.22.3");

dcIOS.setCapability(MobileCapabilityType.BROWSER_NAME, "Safari");

dcIOS.setCapability("automationName", "XCUITest");
dcIOS.setCapability("deviceName", "auto");
dcIOS.setCapability("udid", MyDeviceUDID);
dc.setCapability("user", getUsername());
dc.setCapability("password", getPassword());
dc.setCapability("testName", "My First Appium OSS Test");

Long-Running Commands Limitation

There are some long-running commands in Appium, like [runAppInBackground](appium-server-open-source-execution.md).

In Appium versions below 1.20, the maximum command execution time is 10 minutes (Appium limitation). After Appium 1.20, the maximum command execution time is 20 minutes.

In order to use long-running commands, increase the values in these capabilities.

dc.setCapability("newCommandTimeout", 900); // 15 Minutes
dc.setCapability("wdaConnectionTimeout", 900_000); // 15 Minutes (Relevant for iOS only)