When you create a unit test case for a process or case type, you run the process or case type and enter data for assignments and decisions. The system records the data that you enter in a data transform, which is created after you save the test form. You can start recording at any time.
Before you begin:
- Open the flow or case type for which you want to record a test.
On the toolbar, click
. The system starts running the flow or case type.
- Enter input as you step through the flow or case type.
- Click Create test case in the lower-right of the screen to save the recording as a test case.
- Click Save, enter a label that identifies the test case, and then click Submit.
- Optional: To modify the rule or class that is used for the test, in the upper-right corner of the Definition tab, click the Gear icon, select the rule or class, and then click Submit.
To prevent the test from being run as a part of a test suite or from a REST service, on
the Definition tab, select the Disable check
The test case will be run only when you manually click.
- In the Expected results section, add assertions that define the expected results of the test. For more information about creating assertions, see Defining expected test results with assertions.
- On the Setup & Cleanup tab, configure the actions to perform and the objects and clipboard pages to be available before and after the test runs. You can also clean up the clipboard after the test is run by applying additional data transforms or activities. For more information, see Setting up and cleaning the context for a test case or test suite.
- Click Save.
- Configure the unit test case.
After you save the test case, a data transform, which captures the input that you entered, is created and associated with the test case. You can edit this data transform to modify the test case input. The Edit test case form also displays the path of the flow or case type.