
Performance Tester has an optional SOA extension that can be used for service testing. However, Performance Tester does not include web service examples that can be used to learn the service testing functionality. So, if we have Test Control Panel installed, we can use its sample web services in Performance Tester. This is a great learning aid and provides some additional integration points between the two products.
Web Service Examples in Test Control Panel
Before we can use the examples, we must know where they're located. On Test Control Panel, there's an Examples link that opens the examples page,
(https://localhost:5443/RTCP/examples/).

The Web Services Example section on the page shows three examples: Calculator, Echo, and Login. Let’s see the Calculator example here.

Click the Calculator WSDL hyperlink and we can get the URL for its WSDL.

Creating a Service Test for the Calculator Example Using the General Service Client
The steps are straightforward.
1. Click the General Service Client tab.
2. Click the + icon.
3. Choose Import WSDL from URL.
4. In the URL field, add the URL for the calculator example.

5. Perform the various operations and create a Request History.

6. From the Request History, we can create a service test.


Now, the service test is successfully created!

Creating a Service Test by Using Integration Tester as an Unmanaged Application
Another way to create a service test is to create one from a recording.
So, we need a client that sends the service request and Performance Tester to capture it. Let’s use Integration Tester as our client.
Firstly, let’s create a project in Integration Tester using the same calculator example calculator WSDL and a simple test that sends an Add request for adding "1" and "2".

The next step is to perform a new service test from a recording.

Choose Unmanaged Application.

A proxy is created on port 1080.

This means that we must configure Integration Tester to use port 1080 as the proxy. This is done in the physical view for the transport used by the Add test.

Run the Add test again in Integration Tester and we can see the traffic being captured by Performance Tester. Stop recording in Performance Tester and generate the test. When prompted for the WSDL, select the WSDL that we already imported for the calculator.
Now, we now have a service test that we can run in Performance Tester.

When playing back the test, we get the expected result of "3" as being the sum of "1" and "2".
Configuring the Service Test to Hit a Stub Published to Test Control Panel
In Integration Tester, you can create a stub for the Add action that returns "123" regardless of what values are sent to it. If we get "123" in return for an Add request, then we can be sure that the stub was hit and not the live service.

Here's the routing rule. Note that the SOAPAction must be "Add" and not Add. You must enclose Add within quotes.

To hit the stub in Test Control Panel, we must go through the proxy of Test Control Panel on port 3128. So, back in Performance Tester, we must configure the transport to use port 3128.
So, select a request, and then the Transport tab. Click the Change button and select Open Protocol configurations Editor.

Configure the proxy with the address as localhost and port as 3128.

Ensure to change the SOAPAction to "Add". This is done in the Transport editor as well. You must enclose the existing Add within quotes.

Now, run the test. As expected, the first request hit the stub and we get "123" as the result.

The second and third requests get "3", which means, it hit the live calculator service and not the stub for the calculator service. This is because the proxy was not configured on the other two requests.

Conclusion
We can use Test ControlPanel web service examples in three ways with the Performance Tester service testing extension. It's useful as a training aid in learning the SOA part of Performance Tester.
There is an overlapping functionality of service testing in Integration Tester and Performance Tester, but the approaches are different.
Performance Tester has some powerful features that Integration Tester doesn't have (and vice versa). For example, we can use datapools in Performance Tester . We can create a schedule with performance test a service simultaneously with multiple virtual users. The performance test concept of Integration Tester exercises a service with a single user, but controls the rate of iteration.
Also, one of the integration points is that we can make service stub in Performance Tester and use Integration Tester to hit it.
So, it is interesting to learn how Integration Tester and Performance Tester can complement each other out of the box.
About the author Paul Liskay is a Level 2 support engineer for the Testing Tools for the US geography, focusing primarily on Performance Tester, Integration Tester, and Web UI Tester. Prior to joining the support team, he was the team lead for the Integration Tester 8.0 release, and a team lead for Performance Tester for the 8.0 through 8.2 releases. He was also on the system test team for Rational Team Concert for the 4.0 release.