Skip to main content

Unit testing a Service Email rule

Suggest edit
Updated on November 15, 2021

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

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

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

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 below, and then click Execute.

Requestor context - Select a context 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 ID - If 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 password - If 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

Message header values - Enter one value for each message header declared on the Request tab.

Message content - Type or paste in the text that forms the content of the arriving email message.

Activity for adding attachments - If the arriving test message is to include email attachments, identify here the Activity Name key part of the test activity described above.

Did you find this content helpful? YesNo

Have a question? Get answers now.

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

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