Skip to main content

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:

  1. In the Scenario tests pane, select a test case and then click Edit in the header of the pane,
    Edit option
  2. In the Scenario tests pane, open a test case and then click Edit in the header of the pane.
    edit scenario test second option

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.
    edit option

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 Description pane that contains the following sections:

  • Expected Results: 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.
  • Actions: This section contains the value that is applied by the test case on the control during the playback of the test case.
    image depicts how the user must click the Pencil icon to open the test case so as to modify the contents of the step.

The following figure shows the different attributes and comparators available for a Textbox UI control:

Image 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 Delete icon at the end of a row in the Expected results 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 Expected results section and configure the values for the selected UI control attribute.

The More 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.
    Vertical ellipsis to edit

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 Description pane.

image depicts how users can configure execution delay on any step in the Scenario test case.

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.

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