# Execute Methods

QATTS has 2 types of execute methods

1. executeFunctio&#x6E;*() - Executes given functionality with data argument. It has access to parent test case data and its own data as well.*
2. *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*&#x20;

**Syntax:**

***void executeXXXX(String functionalityName, Object/String dataInput)***

<table><thead><tr><th width="195.54742547425474">Param Name</th><th width="150">Type</th><th>Condition</th><th>Description</th></tr></thead><tbody><tr><td><em><strong>testCaseName</strong></em></td><td>String</td><td>Mandatory</td><td>Name of the TestCase Name</td></tr><tr><td><em><strong>dataInput</strong></em></td><td><em><strong>Object/String</strong></em></td><td>Optional</td><td>Data Input required to execute this testcase/function</td></tr></tbody></table>

#### DataInput Options

* 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&#x20;
* QArray - Loop on each array item in QArray.&#x20;
* QStringArray - Loop on each item in the array

### Loop Variables and Props

* 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. &#x20;
* LoopName: For DataInput QStringArray, loop item is set to LoopName variable for each access

### Method Definitions

void executeFunction(String ***testCaseName***)

void executeFunction(String ***testCaseName***, String dataName)

void executeFunction(String ***testCaseName***, Object testInputObj)

void executeTestCase(String ***testCaseName***, String dataNameRef)
