Skip to main content

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

Unit testing a Service File rule

Updated on November 23, 2022

Use the unit testing feature to verify that the operations of a service file rule function correctly before you add an external component to your testing process.

Before you begin, see How to provide test data when testing service rules.

Note: Unit testing provides only partial evidence of a correct implementation. For more comprehensive information on testing services, see Testing Services and Connectors, a document available from the Integration pages of the Pega Community.

To run a unit test, complete the following steps:

  1. Save the rule form.
  2. Start the Tracer by clicking ActionsTrace. For more information, see Tracing services.
  3. Click ActionsRun.
  4. Complete the form as described in the following table, and then click Execute.
Requestor Context Select a radio button to define the requestor session is to be used in the test:
  • Use current requestor context — Use your current requestor session (including your RuleSet list, privileges, and current clipboard).
  • Initialize service requestor context — Create a new requestor session based on the APP requestor type and, if the service package requires authentication, another Operator ID instance.

Authentication User IDIf you selected Initialize service requestor context , and the service package instance for the service requires authentication, enter the Operator ID to be used to test the service.
Authentication PasswordIf you selected Initialize service requestor context , and the service package instance for the service requires authentication, enter a password for the Operator ID.
Enter Request Data Select:
  • Supply File Content if you will type in or paste in the text of a test file. This option is not available if non-text input is expected — that is, if the Data Mode field on the Method tab is set to a value other than text only.
  • Upload a local file if the test file is on your workstation or network.
File ContentEnter the contents of a test file, including delimiters. This text area appears when you choose Supply File Content for the previous field.
File Location Click Browse to upload a test file. This field appears when you choose Upload a local file for the previous field.

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

Close Deprecation Notice
Contact us