You are here: Record management > Rule and application testing > PegaUnit testing > Creating a PegaUnit test case for a flow or case type

Creating a PegaUnit test case for a flow or case type

When you create a PegaUnit test case for a flow or case type, you run the flow 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.

See Data that you can record for flows and case types for information about the data that you can record.

Some properties, like .pyID, are not processed when a PegaUnit test case is run. These properties vary for every test run. The pxDataCapturePropertyIgnore data transform displays the properties that PegaUnit tests do not process.

Complete the following steps:

  1. Optional: Exclude properties in your work class from the test by modifying the pyDataCapturePropertyIgnores data transform.

  1. Complete one of the following tasks:

  2. From the toolbar, click Action > Record test case. The system starts running the flow or case type.

  3. Enter input as you step through the flow or case type.

  4. Click Create test case in the bottom right corner of the browser to start recording the test case and create a test case in a new tab. The test case contains all the information that you entered up until you created the test case.

    You can continue to run the flow or case type and create additional test cases in the tab that is running the flow or case type.

  1. Configure the PegaUnit test case.

  2. 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.