Execute Methods
Execute methods normalize a script in an action class and then reuse it in one or more action classes.
Last updated
Execute methods normalize a script in an action class and then reuse it in one or more action classes.
Last updated
QATTS has 2 types of execute methods
executeFunction() - Executes given functionality with data argument. It has access to parent test case data and its own data as well.
executeTestCase() - Executes given functionality as new Test Case. It doesn't have access to parent test case data. Its has its own data context. Can use run variables to pass data from parent functionality
Syntax:
void executeXXXX(String functionalityName, Object/String dataInput)
Param Name | Type | Condition | Description |
---|---|---|---|
No Input - if data input is not given, data will be picked from Product Element with same test case name
String - String input can be Product Element, a data base query expression or a data table expression. On evaluating dataInput, we may get QData, QArray or QStringArray. Executions' will be based on the input object. See below object types.
QData - Merge QData with parent test data and executes functionality
QArray - Loop on each array item in QArray.
QStringArray - Loop on each item in the array
LoopIndex: LoopIndex will track the iterations. LoopIndex starts with 1 and increments by 1. Start of loopindex can be changed with prop.loopIndex.
prop.loopIndex: Set to to functionality that you are executing with execute functions.
LoopName: For DataInput QStringArray, loop item is set to LoopName variable for each access
void executeFunction(String testCaseName)
void executeFunction(String testCaseName, String dataName)
void executeFunction(String testCaseName, Object testInputObj)
void executeTestCase(String testCaseName, String dataNameRef)
testCaseName
String
Mandatory
Name of the TestCase Name
dataInput
Object/String
Optional
Data Input required to execute this testcase/function