Modifying Pega scenario test cases
When the functional flow or the user interface components of an application change, you may need to modify existing scenario test cases to ensure that they comply with the modified application behavior. You can use the Edit feature to modify the test cases in Dev Studio or any User portal.
Modifying a test case from a User portal
In a User portal, you can start the editing process in one of the following two ways:
- In the
pane, select a test case and then click in the header of the pane, - In the
pane, open a test case and then click in the header of the pane.
When the test case is open, hover the mouse pointer on any step of the test case to display the following icons:
- Edit icon (Pencil): Opens the test case so that you can modify the contents of the step.
- More menu (Ellipses): Displays the options to add, remove, and re-record steps.
Scenario tests validate the data that you enter, as well as the attribute of the selected UI control. The tests also change the value that you enter in the control during playback when you run the test.
The Edit icon gives you access to a pane that contains the following sections:
- : This section contains validations for the list of attributes that are available to the control, compared to an ample number of comparators based on the type of control.
: This section contains the value that is applied by the test case on the control during the playback of the test case.
The following figure shows the different attributes and comparators available for a Textbox UI control:
The attributes and comparators of a control can change, based on the type of UI control associated with the step that you edit.
Using the icon at the end of a row in the section, you can change the content of any validation that you have already recorded, and also remove validations. To include additional validations, click + Add underneath the section and configure the values for the selected UI control attribute.
The menu on a step gives you access to the three following options:
- Remove step: Remove the step from a test case.
- Add steps: Add any number of steps between the current and the next step. When you select this option in a step, the test case runs and stops at the step at which you have chosen to add steps. You can add any number of steps and save the test case. This is useful when the main flow of the test case remains the same, but you need to make minor functional flow changes between steps.
- Re-record from here: Similar to Add steps, however, all the steps that follow the current step will be discarded by the application after you record the new steps. This is useful when the flow of a test case completely changes after a particular step.
Check your knowledge with the following interaction:
Modifying a test case in Dev Studio
In Dev Studio, you can modify the contents of recorded steps, similar to how you edit the contents of steps in a User portal. However, you cannot add or remove steps in Dev Studio, as this can only be done in a User portal.
Configuring execution delays between steps of a Pega scenario test case
Because Pega scenario tests are UI driven, there may be delays in identifying controls and loading them on the screen. When this happens while running a test, or you expect that it will happen, you can configure delays between steps.
You can configure an execution delay on any step in the scenario test case, in either a User portal or in Dev Studio. You enter a wait time in milliseconds in the Wait field of a step's pane.
When configured on a step, this delay applies only to that particular step of the test case. The test case then waits for that amount of time before proceeding to run the next step.
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?