+

Search Tips   |   Advanced Search


Updating a service response from the service

While you are developing a service test, you can send a request from the test editor to record or update the response element.

Service response elements are children of service request elements. Service tests use response elements to measure the response time between a call and the corresponding response. Response elements can also contain verification points. You can click Update Response in the request element to complete one of the following actions:

After updating the response content, data correlation or verification points that referred to replaced content might no longer work. You can use the test editor to create or edit response elements in a service test. There are three methods of adding a service response:

WebSphere MQ and JMS requests can contain multiple response elements. To add a response element to a service test:

  1. Open the test in the test editor, and select a service request element.

  2. On the Test Element Details page, click Update Response. Alternatively, right-click the service request element, and click Add > Response from Request. This action performs the service request. If the request is valid, the Update Response window opens and displays the response data.

  3. In the Return Preview window, review the content of the response to ensure that it is correct. For the WebSphere MQ and JMS protocols, if multiple responses are received, then click the arrows to view each response.

    1. Click the Message tab to view the contents of the response in the Form, Tree or Source view.

    2. Click the Attachment tab to view any resource files that were attached to the response.

    3. Click the Response Properties tab to view the properties of the response.

  4. To use the received response in the test, click Update Test. This creates the response elements as a child of the request element or updates the existing response elements with the new data.


What to do next

After creating or updating response elements, you can create verification points on the response contents to test the behavior of the service.


Related tasks

  • Manually adding a response element
  • Verify application behavior