Configuring expected run-time assertions

You can create an assertion for the expected run time of the rule. The expected run-time assertion is less than or equal to an amount of time that you specify, in seconds.

By default, after you create a Pega unit test case for a data page, the system generates the expected run-time assertion. The default value of the expected run time is the time that is taken by the rule to fetch results when the test was first run. The system compares that time against future run-time tests.

You can change the default value and configure expected run time assertions for all rule types by completing the following actions:

  1. Open the Pega unit test case, if it is not already open.
  2. Complete one of the following actions:
    • To add a new assertion, click Add expected result at the bottom of the page.
    • Modify an existing assertion.
  3. From the Assertion type list, select Expected run time.
  4. In the Value field, enter a value, in seconds, that specifies the amount of time within which the execution of the rule should be completed.
  5. Optional: If you want the test case to fail when the rule is not run within the specified time, select the Fail the test case when this validation fails check box.
  6. Optional: To add a comment, click the Add comment icon, enter a comment, and click OK.
  7. Click Save in the rule form.