Skip to main content

Obtain Your Access Key

Continuous Testing Cloud lets you remote testing if you specify your username and password in the Desired Capabilities. However, best practice is not to use your username and password in your code. Instead, use your Access Key.

To obtain your access key:

  1. On the top right of the screen, click your user avatar → Get Access Key
  2. In the Access Key dialog, click the copy to clipboard button.

Now you can use it in your code. To do so, add it to the Desired Capabilities

info

Replace <server> with the appropriate URL.

Java Expand source

String accessKey = "<Your Access Key>"
dc.setCapability("accessKey", accessKey);
driver = new AndroidDriver(new URL("<server>"),dc);

C Sharp Expand source

string accessKey = "<Your Access Key>"
dc.SetCapability("accessKey", accessKey);
driver = new AndroidDriver<AndroidElement>(new Uri("<server>"), dc);

Python Expand source

accesskey = '<Your Access Key>'
self.dc['accessKey'] = self.accessKey
self.driver = webdriver.Remote('<server>', self.dc)

Ruby Expand source

desired_caps = {
caps: {
accessKey: '<Your Access Key>',
appium_lib: {
server_url: '<server>',
}
},

Reset Your Access Key

You can reset your access key at any time. Do this if your key is compromised. 

info

When you change your access key, any tests currently running that use it may fail.

  1. On the top right of the screen, click your user avatar → My account.

  2. In the My Account page, click on Reset Access Key.

  3. In the confirmation dialog, click Reset Access Key.