Webdriver.io Starter Code
You can use any Webdriver.io test framework to run tests using Continuous Testing Cloud.
After setting up your local environment, you can easily integrate your test with the Cloud by using this config file.
Webdriver.io Config File Example
exports.config = {
runner: 'local',
hostname: 'cloud.experitest.com',
protocol: 'https',
port: 443,
path: '/wd/hub',
specs: [
'./*.js'
],
capabilities: [{
'experitest:accessKey': '<ACCESS_KEY>', //Or userName, password and projectName if needed
platformName: 'android',
'appium:udid': '<Device-Udid>', //Optional
'appium:appiumVersion': '1.22.2',
'experitest:testName': 'Appium WebdriverIO native test', //Optional
}],
mochaOpts: {
ui: 'bdd',
timeout: 60000
},
}
To use Continuous Testing additional capabilities, use this format:
'experitest:testName' : 'here is the test name',
To use Appium capabilities, use this format:
'appium:udid' : 'Device ID',
These capabilities can be used when creating the Driver:
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 | |
projectName | Name of the project to use | Only if the cloud user is associated with more than one project | |
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 or not | No | TRUE |
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) |
takeScreenshots | Enable or disable taking screenshots for a report False improves running performance. | No | TRUE |
platformName | iOS/Android | Yes |