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:

screenshot of invoking the connection of web service testing

Select the relevant Web Service Connection in the Connection parameter:

how to 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 for Provar 1.9.7 and later), 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:

how to perform REST test request

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

screenshot of Resource URL, Request Header and Method in web services testing

  • 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:

GET Read
POST Create
PUT Update/Replace
PATCH Partial Update/Modify

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:

an example of POST style web service testing

Here is a PATCH example:

example of PATCH web service testing

Once the test case is run, it will appear as follows in the Test Runner:

screenshot of a Test Run

The RestResponse and RestResponse status will also be shown under Variables(after) in the Variables view:

RestReponse variable sample

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.

For example:

screenshot of AWS Operations sample

After executing the above create bucket API through Provar, 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:

how to delete BUCKET using delete method

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.

How to save a Resorce URL file and its format

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

Web Services testing view in AWS

And in Provar Desktop:

Web Services testing view in Provar Desktop

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, for example:

sample of AWS APIs with custom lambda integration

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:

how to Perform a SOAP request

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:

sample body of Web Service request

For example:

icon of a user in healthcare industry

Once the test case is run, it will appear as follows in the Test Runner:

viewing a test case in test runner

The WebResponse and SoapResponseStatus will also be shown under Variables(After) in the Variables view.

sample of WebResponse and SoapResponseStatus variable status

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