Documentation

Looking for something in particular?

Invoking the Connection in Web Services Testing

Invoking the Connection in Web Services

Once you have created the REST or SOAP Web Service Connection, you can invoke the connection in web service testing from the test case to perform.

Invoking the Connection in Web Services test, follow the step from the Data section of the Test Palette, then click and drag it into the test case:

Select the relevant Web Service Connection in the Connection parameter:

Now, you can perform a SOAP or REST request. To perform a REST Request (including AWS operations), move on to the next section. For a SOAP Request, skip ahead to Performing a SOAP Request.

Performing a REST Request

To perform a REST request, locate the Web Request (HTTP/REST) test step from the Data section of the Test Palette, then click and drag it into the test case:

You will be asked for the Resource URL, Request Header, and Method:

  • Resource URL: URL of the object or set of objects that are exposed at the API endpoint
  • Request Header: Optional parameter for HTTP headers, allowing the client and the server to pass additional information with the request or the response
  • Method: Methods for mapping CRUD (create, retrieve, update, delete) operations to HTTP requests

The HTTP methods are as follows:

HTTP Method CRUD
GET Read
POST Create
PUT Update/Replace
PATCH Partial Update/Modify
DELETE Delete

If the Method is POST, PUT, or PATCH, you will also be asked for the Body Style and Body.

  • Body Style: In this, we specify the body format that needs to be sent. Body style can be JSON, Multipart, or Other.
  • Body: The term Body distinguishes between the ‘interesting’ information in a chunk of data. The Body is the data we need to send to create or update something.

Here is a POST example:

Here is a PATCH example:

AWS Operations

For an AWS Authentication REST Connection, we can then use REST Requests to perform operations on AWS. We can create a bucket using a PUT method, setting the Resource URL to the bucket name and entering content in the Body with location configurations.

After executing the REST API step through Automation, we can see the bucket created in AWS.

sample of bucket created from AWS

We can also delete a bucket using a DELETE method, for example:

We can also upload objects in a bucket through Provar and perform actions on them.

For this, the Resource URL should have the format /bucketname/filename, the Body parameter should have the file content, and Content-Type should specify the file format.

After successful execution, the results can be viewed in AWS and in Automation:

Web Services testing view in AWS

For AWS APIs with a custom Lambda integration, we need to pass the stage URL (the basic URL to perform rest requests) and other parameters.

Performing a SOAP request

To Perform a SOAP request, locate the Web Service Request (SOAP) test step from the Data section of the Test Palette, then click and drag it into the test case:

You will then be asked for the WSDL Location Override. This is an optional parameter where you can define a different WSDL from the one set at the SOAP Connection level. (If it is the same, leave it blank.)

You will then be asked for the Service, Port, Operation, and Body Contents, which will populate once the WSDL is loaded.

  • Service: A service is a well-defined, self-contained function representing a functional unit. A service can exchange information with another service. It is not dependent on the state of another service.
  • Port: The WSDL portType element defines a group of operations, also known as an interface in most environments. Each operation element contains a combination of input and output elements, and when you have an output element, you can also have a fault element.
  • Operation: An operation is a particular action performed by a service, such as any of the “get scores,” “get schedules,” and “get standings” examples for the World Cup service.
  • Body Content:  Body Content contains the data needed to be sent to process a request.

For Body Contents, click the magic wand icon to Generate a sample body for this Web Service request:

Review Provar on G2
Documentation library

Trying to raise a case with our support team?

We use cookies to better understand how our website is used so we can tailor content for you. For more information about the different cookies we use please take a look at our Privacy Policy.

Scroll to Top