When unit testing service rules, you can provide some representative data for the service rule either by typing or pasting in text, or by identifying an activity that will generate the test data.
Before you begin, determine how you to provide the sample data for the rule to process. Each service rule type has different options.
Service Type |
Test Data Options |
EJB, HTTP, JMS, Java, JSR 94, and MQ |
|
Manually provide values for the subject and body of the email message. |
|
File |
|
SOAP and .NET |
Additionally, if the rule has data mappings for request headers, you must enter values for them, too. |
If the EJB, HTTP, JMS, Java, JSR 94, or MQ service rule that you want to test receives objects rather than scalar values in the request, you cannot provide request values directly in the unit testing form. Instead, create and identify an activity that sets the request values.
The Data-Admin-IS-ClientSimulation class is a helper class for the unit testing feature. A page of class Data-Admin-IS-ClientSimulation serves as temporary storage location for the test data that the unit testing feature uses to test a service rule. Your activity must create a page named pySimulationDataPage
for the Data-Admin-IS-ClientSimulation class and store the test request data on that page.
Value Group
property named pyRequestHeaderGroup to store test data for HTTP, JMS, or MQ header fields.Value Group
property named pyRequestPropertyGroup to store test data for JMS message properties.For an example, locate and open one of the following standard activities:
You can use one of these activities as the template for yours: save it into the appropriate RuleSet and specify the same Applies To class as that specified as the primary page class on the Service tab of the service rule that you want to test.
Service Email | Service EJB |
Service File | Service HTTP |
Service Java | Service JMS |
Service JSR94 | Service MQ |
Service .Net | Service SOAP |