...
Info |
---|
For Example, Function Test() On Error Resume Next On Error Goto 0 End Function |
- Execution Report Value
All custom actions shall return following integer values only as shown in the following table.
Return | Description |
---|---|
0 | For passed test cases |
1 | For failed test cases |
2 | For defective test cases |
No two custom actions can have the same function name in the same class.
Once the custom action is mapped into Qualitia and used in a test case, do not change the existing signature or other details of the action. The logic of the action can be modified. Also do not delete the action that has been used in the Test Case.
- Add the following block to report the function execution status back to Qualitia Report
Info |
---|
For example, If err.number = 0 Then WaitFor = 0 WriteStatusToLogs "Action: "&strMethod&vbtab&_ "Status: Passed " &Vbtab&_ "Message: Waited successfully for "&intWaitTime&" secs" Else WaitFor = 1 WriteStatusToLogs "Action: "&strMethod&vbtab&_ "Status: Failed" &Vbtab&_ "Message: An error occurred during the wait" End If |
Assign the execution report value as Pass or Fail to the function. In Qualitia, 0 defines as Passed, 1 as Failed and 2 as Defect. We can also assign the value using variables ‘STATUS_PASSED’, ‘STATUS_FAILED’ and ‘STATUS_DEFECT’. The WriteStatusToLogs is used to display the message in Qualitia execution report.
- Return a Value or Store a Value in a Variable
To return a value/store a value in variable from custom action, we need to use the following code:
For example, AddItemToStorageDictionary strKey, strValue
...