Skip to main content

Vitaq Ai WebdriverIO Service

Configuring Vitaq AI for Test Activity runs#

Vertizan has developed a custom WebdriverIO service called "vitaqai" that enables WebdriverIO users to take advantage of the AI-driven, end-to-end Test Automation tool, Vitaq AI. It connects WebdriverIO to the vitaq.online cloud so that user created Test Activities can be run using WebdriverIO CLI.

The service contains many configurations that can either be set in the settings section of the vitaq.online dashboard or in the service configuration in wdio.conf.js or with the command line.

The command line takes precedence, then the wdio.conf.js then the settings in the dashboard.

When defining the settings on the command line, use -- (minus minus, with no space) as a prefix e.g.,

>npx wdio run wdio.conf.js --seed 1-10 --sequence myUserJourney1

For Boolean values, any value that looks like a Boolean can be used e.g. true/false, yes/no, on/off, 1/0.

Command line and config file (wdio.conf.js) parameters#

These parameters are required for the vitaqai service:#

--userName#

Specify the user name to log into a valid Vitaq account

>npx wdio run wdio.conf.js --userName maria@wside.com

Default: no default value

userName in wdio.conf.js#

services: [
['vitaqai', {
userName: 'maria@wside.com',
projectName: "onBoarding",
testActivityName: 'swaglabs',
url: "https://vitaq.online",
userAPIKey: "ugeiugdeug",
useSync: false
}],

--userAPIKey#

Specify the user API key which you obtain from your vitaq account in vitaq.online

>npx wdio run wdio.conf.js --userAPIKey yudfgiudfiug

Default: no default value

userAPIKey in wdio.conf.js#

services: [
['vitaqai', {
userName: 'maria@wside.com',
projectName: "onBoarding",
testActivityName: 'swaglabs',
url: "https://vitaq.online",
userAPIKey: "ugeiugdeug",
useSync: false
}],

--projectName#

Specify the project name that contains the Test Activity that you want to run with WebdriverIO

>npx wdio run wdio.conf.js --projectName onBoarding

Default: no default value

projectName in wdio.conf.js#

services: [
['vitaqai', {
userName: 'maria@wside.com',
projectName: "onBoarding",
testActivityName: 'swaglabs',
url: "https://vitaq.online",
userAPIKey: "ugeiugdeug",
useSync: false
}],

--testActivityName#

Specify the test activity name you wish to run with WebdriverIO

>npx wdio run wdio.conf.js --testActivityName swaglabs

Default: no default value

testActivityName in wdio.conf.js#

services: [
['vitaqai', {
userName: 'maria@wside.com',
projectName: "onBoarding",
testActivityName: 'swaglabs',
url: "https://vitaq.online",
userAPIKey: "ugeiugdeug",
useSync: false
}],

--url#

Specify the URL to access Vitaq in the cloud

>npx wdio run wdio.conf.js --url https://vitaq.online

Default: "https://vitaq.online"

url in wdio.conf.js#

services: [
['vitaqai', {
userName: 'maria@wside.com',
projectName: "onBoarding",
testActivityName: 'swaglabs',
url: "https://vitaq.online",
userAPIKey: "ugeiugdeug",
useSync: false
}],

These parameters are optional for the vitaqai service:#

--useSync#

Specify if you want to use WebdriverIO sync or async mode

>npx wdio run wdio.conf.js --useSync true

Default: false

useSync in wdio.conf.js#

services: [
['vitaqai', {
userName: 'maria@wside.com',
projectName: "onBoarding",
testActivityName: 'swaglabs',
url: "https://vitaq.online",
userAPIKey: "ugeiugdeug",
useSync: true
}],

--reloadSession#

Specify if the browser session should be reloaded prior to the next seed, at the expense of a longer test time. Applications that store state should be reloaded

>npx wdio run wdio.conf.js --reloadSession true

Default: false

reloadSession in wdio.conf.js#

services: [
['vitaqai', {
userName: 'maria@wside.com',
projectName: "onBoarding",
testActivityName: 'swaglabs',
url: "https://vitaq.online",
userAPIKey: "ugeiugdeug",
useSync: true,
reloadSession: true
}],

--seed#

Specify the seed number to use. Seed needs to be of the form: 1-5,6,7,8,9,10-16,17 - no spaces, only allowable characters are 0-9, comma and dash.

>npx wdio run wdio.conf.js --seed 1-100

Default: no default value

seed in wdio.conf.js#

services: [
['vitaqai', {
userName: 'maria@wside.com',
projectName: "onBoarding",
testActivityName: 'swaglabs',
url: "https://vitaq.online",
userAPIKey: "ugeiugdeug",
useSync: true,
reloadSession: true,
seed: 1-100
}],

--sequence#

Specify the name of the sequence to run

>npx wdio run wdio.conf.js --sequence userJourneyBackpack

Default: no default value

sequence in wdio.conf.js#

services: [
['vitaqai', {
userName: 'maria@wside.com',
projectName: "onBoarding",
testActivityName: 'swaglabs',
url: "https://vitaq.online",
userAPIKey: "ugeiugdeug",
useSync: true,
reloadSession: true,
seed: 1-100,
sequence: userJourneyBackpack
}],

--useCoverage#

Specify if you want to use the QA coverage functionality of Vitaq

>npx wdio run wdio.conf.js --useCoverage true

Default: no default value

useCoverage in wdio.conf.js#

services: [
['vitaqai', {
userName: 'maria@wside.com',
projectName: "onBoarding",
testActivityName: 'swaglabs',
url: "https://vitaq.online",
userAPIKey: "ugeiugdeug",
useSync: true,
reloadSession: true,
seed: 1-100,
useCoverage: true
}],

--hitOnError#

Setting to indicate if a coverage hit should be recorded when an error occurs

>npx wdio run wdio.conf.js --hitOnError true

Default: no default value, if not specified in WDIO environment comes from VitaqUI settings

hitOnError in wdio.conf.js#

services: [
['vitaqai', {
userName: 'maria@wside.com',
projectName: "onBoarding",
testActivityName: 'swaglabs',
url: "https://vitaq.online",
userAPIKey: "ugeiugdeug",
useSync: true,
reloadSession: true,
seed: 1-100,
hitOnError: true
}],

--useAI#

Setting to make Vitaq use artificial intelligence machine learning functionality to close QA coverage

>npx wdio run wdio.conf.js --useCoverage true --useAI true

Default: no default value, if not specified in WDIO environment comes from VitaqUI settings

useAI in wdio.conf.js#

services: [
['vitaqai', {
userName: 'maria@wside.com',
projectName: "onBoarding",
testActivityName: 'swaglabs',
url: "https://vitaq.online",
userAPIKey: "ugeiugdeug",
useCoverage: true,
useAI: true
}],

--aiVariability#

Determines how much exploration is done. A value for the starting variability to use for the AI between 0 and 1

>npx wdio run wdio.conf.js --useCoverage true --useAI true --aiVariability 0.1

Default: no default value, if not specified in WDIO environment comes from VitaqUI settings

aiVariability in wdio.conf.js#

services: [
['vitaqai', {
userName: 'maria@wside.com',
projectName: "onBoarding",
testActivityName: 'swaglabs',
url: "https://vitaq.online",
userAPIKey: "ugeiugdeug",
useCoverage: true,
useAI: true,
aiVariability: 0.1
}],

--aiVariabilityDecay#

Specifies how quickly we move from exploration to directed. A value to use for the decay of the variability between 0 and 1

>npx wdio run wdio.conf.js --useCoverage true --useAI true --aiVariability 0.1 --aiVariabilityDecay 0.9

Default: no default value, if not specified in WDIO environment comes from VitaqUI settings

aiVariabilityDecay in wdio.conf.js#

services: [
['vitaqai', {
userName: 'maria@wside.com',
projectName: "onBoarding",
testActivityName: 'swaglabs',
url: "https://vitaq.online",
userAPIKey: "ugeiugdeug",
useCoverage: true,
useAI: true,
aiVariability: 0.1,
aiVariabilityDecay: 0.9
}],

--noProgressStop#

Specify how many runs to complete without the coverage increasing before Vitaq stops the run.

>npx wdio run wdio.conf.js --useCoverage true --useAI true --aiVariability 0.1 --aiVariabilityDecay 0.9 --noProgressStop 10

Default: no default value, if not specified in WDIO environment comes from VitaqUI settings

noProgressStop in wdio.conf.js#

services: [
['vitaqai', {
userName: 'maria@wside.com',
projectName: "onBoarding",
testActivityName: 'swaglabs',
url: "https://vitaq.online",
userAPIKey: "ugeiugdeug",
useCoverage: true,
useAI: true,
aiVariability: 0.1,
aiVariabilityDecay: 0.9,
noProgressStop: 10
}],

--aiRandomSeed#

Specify if the AI should use a random seed or start from 1

>npx wdio run wdio.conf.js --useCoverage true --useAI true --aiVariability 0.1 --aiVariabilityDecay 0.9 --noProgressStop 10 --aiRandomSeed true

Default: no default value, if not specified in WDIO environment comes from VitaqUI settings

aiRandomSeed in wdio.conf.js#

services: [
['vitaqai', {
userName: 'maria@wside.com',
projectName: "onBoarding",
testActivityName: 'swaglabs',
url: "https://vitaq.online",
userAPIKey: "ugeiugdeug",
useCoverage: true,
useAI: true,
aiVariability: 0.1,
aiVariabilityDecay: 0.9,
noProgressStop: 10
aiRandomSeed: true
}],