FAILUREMODE (ENUM) ¶ TYPE FAILUREMODE : This enum defines the possible failure modes in a test manager check. This enum is synchronized to to the .NET FailureMode enum, so all changes here need to be replicated there. Attributes: qualified_only InOut: Name Initial Comment Warning 1 The problem is only reported as a warning in the test report, but execution continues normally. We intentionally start the enum values with 1 to catch uninitialized variables. AbortTestCase The current test case is aborted (and directly following tests of TestCaseType.Consecutive are skipped). This is the default when no mode is explicitly defined nor inherited. AbortUnitTesting The whole IEC Unit Test element is aborted when this failure occurs. AbortTestRun The whole test script run is aborted when this failure occurs.
Function Blocks ¶ BaseMultiTest (FunctionBlock) HandleAssertResult (Method) HasError (Method) SetErrorVars (Method) prvAbort (Method) prvDone (Method) prvError (Method) prvResetOutputs (Method) PrintfOne (FunctionBlock) FB_Init (Method) Print (Method) SetText (Method) Text (Property) Testcase (FunctionBlock) Execute (Method) HandleAssertResult (Method) HasError (Method)
BaseMultiTest (FB) ¶ FUNCTION_BLOCK PUBLIC BaseMultiTest EXTENDS CBM.ETrigA IMPLEMENTS IBaseIecUnitTest This FB is the base for the multi-test POUs and contains the additional inputs and outputs. InOut: Scope Name Type Comment Inherited from Input xExecute BOOL Rising edge: Action starts Falling edge: Resets outputs If a falling edge occurs before the function block has completed its action, the outputs operate in the usual manner and are only reset if either the action is completed or in the event of an error. In this case, the corresponding output values ( xDone , xError , iError ) are present at the outputs for exactly one cycle. ETrigA xAbort BOOL TRUE : Action is stopped immediately and all outputs are reset to their initial values. ETrigA Output xDone BOOL TRUE : Action successfully completed ETrigA xBusy BOOL TRUE : Function block active ETrigA xError BOOL TRUE : Error occurred, function block aborts action FALSE : No error ETrigA xAborted BOOL TRUE : Action aborted by user ETrigA Input diTestCaseIndex DINT Index of the test case which will be executed. In combination with xGetTestInfo = TRUE you can fetch the following information about the multi-test POU: name of the test case categories time-out for the test case If the test case index is -1 then you get the count of test cases in the multi-test POU. xGetTestInfo BOOL If set to TRUE the outputs return the basic information about the test case. Output diTestCaseCount DINT If xGetTestInfo = TRUE and diTestCaseIndex = -1 then you get the count of test cases in the multi-test POU. wsTestCaseName WSTRING(Constants.WSTRING_LENGTH) Name of the current test case wsTestCaseCategories WSTRING(Constants.WSTRING_LENGTH) Test categories diTestCaseTimeout DINT Timeout of the test case. In milliseconds. wsInfo WSTRING(Constants.WSTRING_LENGTH) Info about the test case. It can contain the description of the test step if used by a test table with the necessary column. eError UT_ERROR Error ID wsError WSTRING(Constants.WSTRING_LENGTH) Error message wsWarning WSTRING(Constants.WSTRING_LENGTH) Warning message eFailureMode FAILUREMODE Failure mode informs how to proceed after the test case failed. Methods: HandleAssertResult HasError SetErrorVars prvAbort prvDone prvError prvResetOutputs Structure: HandleAssertResult (Method) HasError (Method) SetErrorVars (Method) prvAbort (Method) prvDone (Method) prvError (Method) prvResetOutputs (Method)
BaseMultiTest.HandleAssertResult (METH) ¶ METHOD HandleAssertResult : BOOL InOut: Scope Name Type Return HandleAssertResult BOOL Input eAssertion_Result ASSERTION_RESULT wsErrorMsg WSTRING(Constants.WSTRING_LENGTH)
BaseMultiTest.HasError (METH) ¶ METHOD HasError : BOOL InOut: Scope Name Type Return HasError BOOL
BaseMultiTest.SetErrorVars (METH) ¶ METHOD PUBLIC SetErrorVars InOut: Scope Name Type Input eError UT_ERROR wsError WSTRING(Constants.WSTRING_LENGTH) eFailureMode FAILUREMODE
BaseMultiTest.prvAbort (METH) ¶ METHOD prvAbort : BOOL InOut: Scope Name Type Return prvAbort BOOL
Assert_ArrayOfLReal_Contains (FUN) ¶ FUNCTION Assert_ArrayOfLReal_Contains : BOOL Assertion function to check that an ARRAY OF LREAL contains a specific value InOut: Scope Name Type Initial Comment Return Assert_ArrayOfLReal_Contains BOOL TRUE if the assertion passes succesfully, FALSE otherwise Input context IBaseIecUnitTest The instance of the test function block calling this function. This instance can be provided by using THIS^ . referenceValue LREAL The value that should be contained actualArray POINTER TO LREAL The array to check precision LREAL 0.0 A value to specify an allowed deviation. Default is 0.0 wsErrorMsg WSTRING(Constants.WSTRING_LENGTH) “” A custom error message, that is added to the error message of the assertion itself. If this parameter is used, it is recommended to adapt the value of the library parameter Constants.WSTRING_LENGTH .
Assert_ArrayOfLReal_ContainsAllOf (FUN) ¶ FUNCTION Assert_ArrayOfLReal_ContainsAllOf : BOOL Assertion function to check that an ARRAY OF LREAL contains all specified values. Important: only unique values are checked, the quantity of values is not considered. InOut: Scope Name Type Initial Comment Return Assert_ArrayOfLReal_ContainsAllOf BOOL TRUE if the assertion passes succesfully, FALSE otherwise Input context IBaseIecUnitTest The instance of the test function block calling this function. This instance can be provided by using THIS^ . referenceValues POINTER TO LREAL An array with all values that should be contained. actualArray POINTER TO LREAL The array to check precision LREAL 0.0 A value to specify an allowed deviation. Default is 0.0 wsErrorMsg WSTRING(Constants.WSTRING_LENGTH) “” A custom error message, that is added to the error message of the assertion itself. If this parameter is used, it is recommended to adapt the value of the library parameter Constants.WSTRING_LENGTH .
Assert_ArrayOfLReal_ContainsNoneOf (FUN) ¶ FUNCTION Assert_ArrayOfLReal_ContainsNoneOf : BOOL Assertion function to check that an ARRAY OF LREAL contains none of the specified values. InOut: Scope Name Type Initial Comment Return Assert_ArrayOfLReal_ContainsNoneOf BOOL TRUE if the assertion passes succesfully, FALSE otherwise Input context IBaseIecUnitTest The instance of the test function block calling this function. This instance can be provided by using THIS^ . referenceValues POINTER TO LREAL An array with all values that should not be contained. actualArray POINTER TO LREAL The array to check precision LREAL 0.0 A value to specify an allowed deviation. Default is 0.0 wsErrorMsg WSTRING(Constants.WSTRING_LENGTH) “” A custom error message, that is added to the error message of the assertion itself. If this parameter is used, it is recommended to adapt the value of the library parameter Constants.WSTRING_LENGTH .