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 Name | Meaning | Mandatory | Default Value |
---|---|---|---|
username | Name of cloud user with which to execute the test. | Yes | |
password | Password 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:accesskey | The accessKey of cloud user with which to execute the test. This can be used instead of username&password&projectName. | No | |
newSessionWaitTimeout | Timeout in seconds to wait when trying to create a new session. | No | 300 |
newCommandTimeout | Timeout in seconds to wait between commands. | No | 60 |
generateReport | Whether to generate a report. | No | True |
experitest:testName | Name of the test to be shown in Cloud UI and Report. | No | Auto-generated |
reservationDuration | Time in minutes for which to reserve the device. | No | 240 (4 hours) |
<br/><br/>takeScreenshots<br/><br/> | Enable or disable taking screenshots for a report.false improves running performance. | No | True |
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);