Pragmas in Test POUs
The following pragmas identify a program or function block as a test POU and define test case properties.
Pragma | Optional | Description |
---|---|---|
| Identifies a function block or program as a test POU When a test is executed, the test POUs are compiled with the testee into a test application. | |
| X | Test case name |
| X | Test case categories which are assigned to the test case (comma-separated) |
| X | Timeout of the test case (in milliseconds) Default value: 15 seconds |
Pragma | Optional | Description |
---|---|---|
| Identifies the function block as a test POU of a multitest | |
| X | Test case name If the name contains the placeholder |
| X | Comma-separated list of test case categories of the test case |
| X | Timeout (in milliseconds) which is applied individually for each test case without its own timeout (and actions |
| X | Number of test cases If the attribute is not available, then the output |
| X | Name of the test case group Example: |
| X | Timeout for a test case group Used together with the pragma Example: At least one of the test POUs from the group has declared the value and contains this pragma. If tests of the group have declared different values, then this leads to an error and the test POUs of the entire group are not performed. The values of the timeouts are assigned based on the lowest group. If a value is missing, then the test case group does not get a defined timeout. The asterisk character (*) is used as a placeholder for undefined values. Example 1 {attribute 'testcasegroup' := 'MyTable.Group 1.Subgroup 2'} {attribute 'testcasegrouptimeout' := '300000,60000,30000'} => Example 2 {attribute 'testcasegroup' := 'MyTable.Group 1.Subgroup 2'} {attribute 'testcasegrouptimeout' := '300000,*,30000'} => Example 3 {attribute 'testcasegroup' := 'MyTable.Group 1.Subgroup 2'} {attribute 'testcasegrouptimeout' := '60000,30000'} => |