Skip to main content

Appium Client

You can use any Appium Client test in any language to run tests using Continuous Testing Cloud Grid.

Continuous Testing Cloud supports version 4.1 and higher of the Java Appium Client.

info

Appium Grid doesn't work with Java Appium client 8+ (or similar clients which use only W3C). If you need to run Appium Grid, use a previous version of the Appium client.

W3C is supported only with Appium Open Source Execution .

Example

Appium Client Test example in JAVA

DesiredCapabilities dc = new DesiredCapabilities();
dc.setCapability("deviceQuery", "@os='android');
dc.setCapability("username", "cloudUsername");
dc.setCapability("password", "cloudPassword");
dc.setCapability("projectName", "cloudProject");

AndroidDriver driver = new AndroidDriver<>(new URL("http://"+cloudHost+":"+cloudPort), dc);

Capabilties

Capability NameMeaningMandatoryDefault Value
usernameName of cloud user with which to execute the test.Yes
passwordPassword of cloud user with which to execute the test.Yes
<br/><br/>projectName<br/><br/>Name of the project to use.Only if the cloud user is



associated with more



than one project
experitest:accesskeyThe accessKey of cloud user with which to execute the test.



This can be used instead of username&password&projectName.
No
newSessionWaitTimeoutTimeout in seconds to wait when trying to create a new session.No300
newCommandTimeoutTimeout in seconds to wait between commands.No60
generateReportWhether to generate a report.NoTrue
experitest:testNameName of the test to be shown in Cloud UI and Report.NoAuto-generated
reservationDurationTime in minutes for which to reserve the device.No240 (4 hours)
<br/><br/>takeScreenshots<br/><br/>Enable or disable taking screenshots for a report.



false improves running performance.
NoTrue

Authentication

Authentication can be done either via user and password or an accessKey.

The user and password or accessKey can either be passed as part of the capabilities as shown above or part of the URL.

User and Password

AndroidDriver driver = new AndroidDriver<>(new URL("http://"+user+":"+password+"@"+host+":"+port+"/wd/hub"), dc);

accessKey

AndroidDriver driver = new AndroidDriver<>(new URL("http://:"+accessKey+"@"+host+":"+port+"/wd/hub"), dc);