You can use service request elements in tests to send a
request to the service.
About this task
Complex service requests or verification points might have empty XML elements that
are not needed in a test script. When playing back the test, you can skip such empty XML elements.
In ensure that the Display the 'Skip if empty' column in XML tree
viewer check box is selected. This option displays a Skip if
empty column in the tree view of the request. You can then choose the XML elements to
skip.
Procedure
- Open the test in the test editor, and select the first
element in the test.
- Click Add and select a service request.
- If you selected WSDL service request, select one or several
WSDL files in your workspace for the web service that you want to
test and click Next. If necessary,
you can import a WSDL file into the workspace with the Add button.
- Select either HTTP, JMS,
or WebSphere MQ depending on the transport
protocol used by the web service, and provide the correct transport
protocol configuration to perform the call. You can create
a New transport configuration or reuse an existing
one.
- Click Finish. This
creates the web service request in the test editor.
- On the Message page of the request,
select the Form, Tree,
or Source views to edit the service request
contents.
- If any resource files are to be attached to the request,
select the Attachment tab. Use Add, Remove,
or Edit to specify the resources that are to
be attached to the request.
- If the service uses encryption, signature or other security
protocols, select the Security for Request and Security
for Response pages to configure the security for this
particular service request or to open the WSDL security editor.
What to do next
After creating elements, you can use the test editor to edit
service requests. You can create a service response element to test
the performance and behavior of the service. You can also replace
some content values with datapool variables or a references.