You can record a service
test by invoking service requests with the generic service client.
After you have sent the requests and received the responses from the
service, select the results in the History section of the generic
service client to generate a test. If you do not have access to a
dedicated client for the service calls, the generic service client
is the easiest way to generate the calls and to record a test.
Before you begin
If you are testing a SOAP-based web service, ensure that
you have access to a valid Web Services Description Language (WSDL)
file. The wizard can import WSDL files from the workspace, the file
system, a remote repository, or from a URL. Ensure that the WSDL files
use the correct syntax for the test environment. The generic service
client might not work with some WSDL files.
If you are using
Secure Sockets Layer (SSL) authentication, ensure that you have the
required key files in your workspace.
If you are using SOAP
security, ensure that you have configured the environment with the
correct libraries and configuration files. See Configuring the environment for SOAP security for more information.
Procedure
- In the Test perspective, click the New Test
from Recording toolbar button
or click .
- In the New Test from Recording wizard,
click Create a test from a new recording, select Service
Test, and click Next.
- On the Select Location page, select
the project and folder where you want to create the test, type a name
for the test, and click Next. If
necessary, click Create Parent Folder
to create a project or folder
- On the Select Location page, select Generic
Service Client. This option uses the generic
service client if you do not have access to a dedicated client for
the service calls. See Recording a service test through a client program for
information about using other client programs to record the test.
- Click Next. If this is the first
time you are recording a Web service test, read the Privacy Warning,
select Accept, and click Finish to
proceed. The generic service client opens.
- If your service uses a transport or authentication protocol
that requires overriding the default settings, then click the Transport tab
and create an HTTP, Java Message
Service (JMS), or IBM® WebSphere® MQ transport.
- Click the Requests tab.
- Click Add a WSDL file
to use a WSDL file from the workspace, to
import a WSDL file, or to link to a remote WSDL file.
- Select the Add an endpoint
file to create a call to an HTTP, JMS, or WebSphere MQ service.
See Sending service requests with the generic service client for more information about using the generic
service client.
- After creating the call, click the Edit Data arrow
to change the details of the call if necessary.
- Click the Invoke arrow to invoke
the service call. If the call was successful, the
response is displayed under the View Response arrow.
- To record a test with multiple calls, repeat steps 6 through
9.
- When you have finished sending service requests, stop the
recorder. You can do this by closing the generic service client or
by clicking the Stop push button
in the Recorder
Control view. If you changed the network settings
of the client program as described in step 8, you can revert to the
default settings before closing the program. The Generate
Service Test wizard opens.
- Click Finish.
What to do next
Alternatively, you can use the generic service client to
create, edit, and invoke the calls without recording. Successful responses
are added to the
Request History list. You
can select calls in the
Request History list,
and click the
Generate Test Suite icon

.