Sending OData endpoint batch requests

To test services that use OData protocol, you can send requests in a batch. The request contains HTTP operations such as GET, POST, and PUT to manage data in the service.

Before you begin

You must have sent individual requests through Generic Service Client (GSC).

About this task

When you send requests in a batch, you can group a set of operations into one HTTP request. You can start a batch request from GSC or from a service test. To initiate a batch request from a service test in the Test editor, select multiple requests to include in a batch, right-click and select $batch odata requests.

To initiate a batch request from GSC, complete the following steps:


  1. Click the Open the Generic Service Client toolbar button Open the Generic Service Client button and select the Requests page.
  2. Click the Add icon Add button and click a type of request that you want to send or in Request Library, right-click EndPoints and select Send a Batch Request.
  3. In the ODATA batch information page, select the OData version that your application supports.
  4. To set HTTP headers, ensure that the Set ODATA batch request http headers radio button is selected.

    If needed, you can change the headers on the next page of the wizard.

  5. To group appropriate requests into change sets, select the ODATA batch with changesets radio button.
  6. In Selection of calls to batch, select the requests to include in the batch.
    If you initiated the batch request from the service test, the requests are already selected.
  7. Click Next.
  8. In the Configure Protocol window, select HTTP and specify the HTTP transport configuration.
    If necessary, click New to create an HTTP transport configuration for the call.

    To send the HTTP/2 requests, in the Create HTTP Protocol configuration window, click the Activate check box. Before capturing the HTTP/2 traffic, configure the computer. See Preparing to record a test for the HTTP/2 service for instructions.

  9. Click Finish.
    The request is added to the Endpoints section of the Request Library.
  10. In the Request Library, select the request element.
    The generic service client shows three steps: Edit Request, Invoke, and View Response. The details for the request are displayed under the Edit Request step.
  11. On the Transport page, if necessary, change the transport configuration to be used by the request.
    To create and edit transport and security configurations, use the Transport tab.
  12. When you are ready, click Invoke to send the service request.
    The generic service client sends the request and displays the message return under the View Response step.