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
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
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
, you can configure the step with one of the following two options:- Apply data transform
- Execute activity
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.
Want to help us improve this content?