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 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:
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 is used to distinguish between the ‘interesting’ information in a chunk of data. Basically, the Body is the data we need to send to create or update something.
Here is a POST example:
Here is a PATCH example:
Once the test case is run, it will appear as follows in the Test Runner:
The RestResponse and RestResponse status will also be shown under Variables(after) in the Variables view:
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:
After executing the above create bucket API through Provar, we can see the bucket created in 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 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:
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:
For example:
Once the test case is run, it will appear as follows in the Test Runner:
The WebResponse and SoapResponseStatus will also be shown under Variables(After) in the Variables view.
- General information
- Licensing Provar
- Provar trial guide and extensions
- Using Provar
- API testing
- Behavior-driven development
- Creating and importing projects
- Creating test cases
- Custom table mapping
- Functions
- Debugging tests
- Defining a namespace prefix on a connection
- Defining proxy settings
- Environment management
- Exporting test cases into a PDF
- Exporting test projects
- Override auto-retry for Test Step
- Managing test steps
- Namespace org testing
- Provar desktop
- Provar Test Builder
- Refresh and Recompile
- Reload Org Cache
- Reporting
- Running tests
- Searching Provar with find usages
- Secrets management and encryption
- Setup and teardown test cases
- Tags and Service Level Agreements (SLAs)
- Test cycles
- Test plans
- Testing browser options
- Tooltip testing
- Using the Test Palette
- Using custom APIs
- Callable tests
- Data-driven testing
- Page objects
- Block locator strategies
- Introduction to XPaths
- Creating an XPath
- JavaScript locator support
- Label locator strategies
- Maintaining page objects
- Mapping non-Salesforce fields
- Page object operations
- ProvarX™
- Refresh and reselect field locators in Test Builder
- Using Java method annotations for custom objects
- Applications testing
- DevOps
- Introduction to test scheduling
- Apache Ant
- Configuration for Sending Emails via the Provar Command Line Interface
- Continuous integration
- AutoRABIT Salesforce DevOps in Provar Test
- Azure DevOps
- Running a Provar CI Task in Azure DevOps Pipelines
- Configuring the Provar secrets password in Microsoft Azure Pipelines
- Parallel Execution in Microsoft Azure Pipelines Using Multiple build.xml Files
- Parallel Execution in Microsoft Azure Pipelines using Targets
- Parallel execution in Microsoft Azure Pipelines using Test Plans
- Bitbucket Pipelines
- CircleCI
- Copado
- Docker
- Flosum
- Gearset DevOps CI/CD
- GitHub Actions
- Integrating GitHub Actions CI to Run Provar CI Task
- Remote Trigger in GitHub Actions
- Parameterization using Environment Variables in GitHub Actions
- Parallel Execution in GitHub Actions using Multiple build.xml Files
- Parallel Execution in GitHub Actions using Targets
- Parallel Execution in GitHub Actions using Test Plan
- Parallel Execution in GitHub Actions using Job Matrix
- GitLab Continuous Integration
- Travis CI
- Jenkins
- Execution Environment Security Configuration
- Provar Jenkins Plugin
- Parallel Execution
- Running Provar on Linux
- Reporting
- Salesforce DX
- Git
- Team foundation server
- Version control
- Salesforce testing
- Adding a Salesforce connection
- Assert Page Error Messages on Add/Edit Product
- Dynamic Forms
- Internationalization support
- List and table testing
- Salesforce Release Updates
- Salesforce Lightning Testing
- Salesforce Lightning Web Component (LWC) locator support
- Salesforce console testing
- Visualforce Testing
- Performance Best Practices
- Testing best practices
- Troubleshooting
- Browsers
- Configurations and permissions
- Connections
- DevOps
- Error messages
- Administrator has blocked access to client
- JavascriptException: Javascript error
- macOS Big Sur Upgrade
- Resolving failed to create ChromeDriver error
- Resolving Jenkins license missing error
- Resolving metadata timeout errors
- Test execution fails – Firefox not installed
- Update to Opportunity field validation behaviour
- Licensing, installation and firewalls
- Memory
- Test Builder and test cases
- Release notes