Test Case Structure Rules ¶
This Rules verifies that a test case consists of a certain number of tickets using Ticket Type Selectors.
-
If no expected ticket can be found in the test case, the
MissingTicketReason
exception will appear in the Verification report. -
If the test case contains an unexpected ticket, the
UnexpectedTicketReason
will appear in the Verification report.
Syntax
1 | check structure consists of <number1 Number> <selector1 String>, ... <numberN Number> <selectorN String>; |
Parameters
-
numberX - The expected number of the specified ticket type selectors.
-
selectorX - The ticket type selector.
Example
1 2 3 | Testcase { check structure consists of 1 MOC1, 3 MOC2; } |
Example
1 2 3 4 5 6 7 8 9 10 11 | // Test case variables variables MOC1 = Tickets("type == 'MOC' && RECORD_NUMBER == 1"); MOC2 = Tickets("type == 'MOC' && RECORD_NUMBER == 2"); end // Test case structure rule Testcase { check structure consists of 1 MOC1, 3 MOC2; check structure consists of 1 MOC1, ${1 + 2} MOC2; } |
The examples above both verify that the test case structure consists of four tickets: one MOC1
and three MOC2
tickets.