Testing and debugging services

 This presentation is part of the Services and Connectors Self-Study Course.

Transcript

There are many facilities to help test out your services:

  1. Clipboard:  Make use of the clipboard throughout your unit testing.
  2. Unit Test Service Activities:  You can individually unit test your service activity prior to creating a service package and service rule.  It can be unit tested in the same way that you would unit test other activities.  Remember that once the service rule is created; the service rule will be doing things like creating a Page, executing a Model, and setting data from the Request. You can create a wrapper activity (that calls the service activity) to set up some of these things, and then unit test by running the wrapper activity.
  3. Unit Test Specialized Rules:  If you are using specialized rules in your data transformations, they can be individually unit tested outside of testing your service rule or service activity.  For instance, there is a Run icon available on a Rule-Parse-XML rule.  This allows you to enter the text to be parsed in several different ways, and then see the results of the parse.
  4. Unit Test Service Rules:  There is a run icon available on a service rule that allows you to unit test it.  By unit testing a service rule you can not only test the service activity, but the data transformations as well. You will be prompted to enter in Request parameters, and if execution is successful, you can see the Response parameter result. When testing, you can also identify whether you are going to use the logged in Requestor context or a completely new Requestor context. If you use the logged in Requestor context, then you can see the results in the Clipboard viewer.
  5. Trace Open Rule:  For some service rules you can perform a Trace Open Rule on the service rule. This opens up a tracer session and you can trace the service rule, not just the service activity.  To make this work you need to select Services in the trace options.  The trace output for a service will show you the data transformations that take place during Request and Response.
  6. Tracer:  For some service rule types you can open up a tracer session and see the results when testing directly from the external client application.  This is very specific to the service type.  It works for Soap and .Net because these communicate via HTTP.
  7. PAL:  You can run PAL to individually test out your service rules and service activities.  It is also possible to write PAL statistics to a log file using the PAL API.
  8. prlogging.xml:  You can log the execution of PRPC classes that support service processing by configuring the classes in prlogging.xml.
  9. Alerts:  There are different options for configuring alerts that are relevant to services. Configuration is done in prconfig.xml.

 


100% found this useful

Have a question? Get answers now.

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