oaUnitFail()
The function set the flag "Failed" for a test case.
Synopsis
int oaUnitFail(string TC_ID, [anytype userTcData]);
Parameter
Parameters | Meaning |
---|---|
TC ID | The test ID. Each test case must contain a test ID. |
userTcData | Optional parameter. Test case specific data can be set for the test case. |
Return Value
The error code. In case of wrong or missing parameters, the function returns -1 or -2. If the "Failed" flag was set, the function returns 1.
Error
The error code
Description
The CTRL OA Unit CTRL extension contains a set of functions that can be used for testing purposes. The function sets the flag "Failed" for a test case.
Example
The example sets the failed flag for two test cases.
#uses "CtrlOaUnit"
main()
{
oaUnitFail("THIS-IS-MY-FIRST-FAILED-TEST-CASE"); //Test case without user data
oaUnitFail("THIS-IS-MY-SECOND-FAILED-TEST-CASE", "Since the test failed"); //Test case with user data
}
Assignment
Availability
CTRL
See also