Skip to main content

Vitaq Library Methods for Test Actions

This is a list of all of the Vitaq library methods that can be used with Test Actions in the webdriverIO Test Action Scripts.

clearCallCount#

This will reset the call count back to the call limit (set by setCallLimit() either in the action properties or in your script ) during a current seed test run. Very useful if you want to dynamically control how many times Vitaq can execute an action during a run.

await vitaq.clearCallCount("Action2")

Clears the call count for this Test Action Action2.

getEnabled#

Get the "enabled" status of a particular Test Action.

await vitaq.getEnabled("expenseAction")

getCallCount#

Get the call count of a particular Test Action.

await vitaq.getCallCount("expenseAction")

getCallLimit#

Get the call limit of a particular Test Action.

await vitaq.getCallLimit("expenseAction")

getSeed


Return the start seed for this Test Activity if used in the green Starting Action Test Script or for a specific Test Action if used in a specific Test Action Script.

Example of how to use this method in Vitaq JS Test Action Script:

console.log('The seed value for this test run is: ', await vitaq.getSeed())

log#

This will print a Console.log into the Vitaq Test Activity log window which can be viewed in the Tab window next to the Script Output window and also in the log file.

Example of how to use this method in Vitaq Test Action Script:

await vitaq.log("This is a console.log message being printed into the Vitaq Test Activity log")

readDataToVitaq#

In the above below the data generated from the Vitaq Test Activity Variable itemPrice can be read from Vitaq and passed directly to another spec Action code in webdriverIO.

Example of how to use this method in Vitaq Test Action Script:

await vitaq.readDataFromVitaq("itemPrice")

sendDataToVitaq#

In the above below the data generated from the Vitaq Test Activity Variable itemPrice can be sent toVitaq and passed directly to another spec Action code in webdriverIO.

Example of how to use this method in Vitaq Test Action Script:

await vitaq.sendDataToVitaq("itemPrice", price)

setCallLimit#

Set the call limit of a particular Test Action.

await vitaq.setCallLimit("expenseAction")

setEnabled#

Set the "enabled" status of a particular Test Action. (i.e.) false disables the action as "No Entry" and true enables it

await vitaq.setEnabled("expenseAction", false)

setExhaustive#

Set the "exhaustive" status of a particular Test Action. (i.e.) true will make a Test Action "exhaustive"

await vitaq.setExhaustive("expenseAction", true)

setMaxActionDepth#

Set the "Action depth" limit of a particular Test Action. (i.e.) the number of actions that can be called in the tree below this action.

await vitaq.setMaxActionDepth("expenseAction", 5)