Configuring case status assertions
You can configure a case status assertion on a flow or case type to verify the status of the case.
If you have multiple assignments on a flow or case type, you can configure a case status on each assignment. The pyWorkPage on the clipboard captures the latest case status, which depends on where you stop recording the flow or case type.
For example, your flow has a
Customer Details assignment, with the case
status set as
New. It also has a subflow with an
Information assignment, with the case status set as
If you record only the
Customer Details assignment, the case status, which
is captured in the .pyStatusWork property on the
pyWorkPage, is set to
New. If you also record the
Account Information assignment, the case status is set to
On the bottom of the Definition tab, click Add expected result.
From the Assertion type list, select Case status.
Select the comparator from the Comparator list.
In the Value field, press the Down Arrow key and select the case status.
To add a comment, click the Add comment icon, enter a comment, and click OK.
- Defining expected test results with assertions
Use unit test cases to compare the expected output of a rule to the actual results returned by running the rule. To define the expected output, you configure assertions (test conditions) on the test cases that the test, when run, compares to the results returned by the rule.
- Converting unit tests to test cases
- Creating unit test cases for rules
For most rules, you can create a reusable test case by converting a unit test to a test case, configuring case details, and then defining expected test results with assertions (test conditions). When the test case runs, the test results are compared to the expected results defined for the rule’s assertions. If the test results do not meet the defined assertions, then the test fails.