Skip to main content

Setup and cleanup for Pega scenario test case data

Every scenario test case that you create for a case type or a user portal requires input data to execute the flow defined in the test case, and depending on the logic of the flow, the test case produces output data. You configure the input data that the scenario test case requires as part of the test case itself to keep the test case independently executable on any environment regardless of the data available in that environment. This configuration makes it easy for users to debug and maintain the test cases during test case failures and refactoring.

You can configure the test data for a rule using the Setup & Cleanup tab of the Pega scenario test case rule form, as shown in the following image. This tab has two sections:

  • Setup
  • Cleanup
The image depicts the Setup & Cleanup” tab of Pega Scenario test case rule form. This tab has two sections “Setup” and “Cleanup”.

Setup

You configure steps to create test data on the clipboard and make that the data is available for the flow recorded in the test case to execute independently. The steps that you configure to setup test data run when you initiate the test case execution. 

You can create test data in the Setup section by configuring following options. The purpose of each step is to create certain test data on the clipboard that is required for the test case to execute independently. When you click Add step, you configure the step with one of the following options:

  • Apply data transform
  • Execute activity
  • Create work object
  • Create data object
  • Load object​​
Users can create test data by using the Setup section clicking Add step and then configuring the step

Cleanup

After you run the test case, it is important to remove the test data, pages, and objects that are created as part of the Pega scenario test case to ensure that data is not duplicated when you run the test again.

On the Pega scenario test case rule form, you can configure steps to clean up the test data after the test case is run in the Cleanup section of the Setup & Cleanup tab. When you click Add step, you can configure the step with one of the following two options: 

  • Apply data transform
  • Execute activity
    The Cleanup section of the Setup & Cleanup tab

Check your knowledge with the following interaction:


This Topic is available in the following Module:

If you are having problems with your training, please review the Pega Academy Support FAQs.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Academy has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice