Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

This content has been archived and is no longer being updated.

Links may not function; however, this content may be relevant to outdated versions of the product.

Advanced editing and validation of result pages

Updated on September 10, 2021

Summary

When using Automated Unit Testing and test cases for regression unit testing, you can specify validate rules to check the values of properties when the test case is played back.

For example, if you want to check that a property value always lies in the range between $50 and $100 when a particular test case is run, you can change the property value that was saved when the test case rule was first created and set the value to a validate rule. When the test case runs, if the resulting value satisfies the validate rule, then the test case status is reported as successful. If the value does not satisfy the validate rule, then the test case is reported as unsuccessful.

This method is typically used for flow test cases, and usually for those properties that are related to time-based values which have different numeric values every time the flow runs. Using validation is an alternative to specifying that differences encountered during the playback of the flow test case should always be ignored for such properties. Instead, by using the validate rule, the test case run is reported as successful as long as the property value adheres to the validate rule.

Suggested Approach

Use the test case's rule form to specify validate rules for properties in the test case.

To edit the result pages of a test case:

  1. From the Rules by Type explorer, select SysAdmin > Test Case. Choose a test case rule from the list.
    In V6.1, the first step is different. To open a test case rule form in V6.1:
    1. Open the Automated Unit Tests gadget by selecting > Application > Automated Unit Testing > Automated Unit Tests.
    2. Select Unit Test Cases to display the current application's test cases.
    3. Right-click on the test case to open the context menu, and select Open.

    The rest of the steps in this article are the same for V6.1.

  2. To begin editing the result pages of the test case, select the Results tab of the test case and click Show Result Pages. The ResultingPage Viewer window opens.

    zzz

  3. In the ResultingPage Viewer window, navigate to the primary page of the step you want to edit and select Action > Update Page.

    zzz

  4. The Update TestCase Page displays a list of all properties and their values for that step in the test case. From here you can change the value of each property or use a validate rule to test the value when the test case runs.

    zzz

    To edit the value of a property, highlight the value of the property and input a new value or a validate rule. For a validate rule, use the following syntax:

    $ [Name of Validate rule]

  5. Once you have finished editing the result pages of the test case, click the Update Page button to update the new property values. Close the ResultingPage Viewer window.
  6. Save the test case rule form.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

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.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us