How to test a SOAP service rule with the Run Rule feature |
Services start their processing in response to a request from an external application. Before you add the external application to your testing process, use the Run Rule feature to verify that the service processes data appropriately by manually providing some representative data to process. You specify a test page for the rule to use, provide sample data as the input, run the rule, and examine the results. Additionally, if Automated Testing is enabled, you can save the test data and its results as a test case rule.
Before you begin, determine how you will provide the sample data for the service rule to process. For help with this step, and for information about additional ways to test your services, see the Pega Developer Network document Testing Services and Connectors.
Complete the following steps:
Field | Description |
Test Cases | If Automated Testing is enabled, select Run Against a saved test case. Then choose an individual test case from the drop-down list. For more information, see the Pega Developer Network article PRKB-25144 How to create and execute test cases for SOAP Service rules. |
Requestor Context | Select one of the following to define the requestor session is to be used in the test:
|
Authentication User ID | If you selected Initialize service requestor context, and the service package 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 | Select one of the following to define the source of request data values for this test:
|
SOAP Header Values | If you selected Specify individual request values for the previous field, enter in the Value field a literal constant value for each Header Field row on the Request tab. Enter a value that matches the XSD type shown. |
SOAP Parameter Values | If you selected Specify individual request values for the previous field, enter in the Value field a literal constant value for each Request Parameters row listed on the Request tab. Enter a value that corresponds to the XSD data type shown. |
SOAP Request Envelope | If you selected Supply Soap Envelope, enter or paste a well-formed and valid XML document in the SOAP Request Envelope text area, starting with the <?xml version=“1.0” ?> declaration. If the service expects requests containing an array element or elements, a skeleton document is provided as a starting point. |