Web services testing
Invoking the Connection
Once you have created the REST or SOAP Web Service Connection, you can now invoke it in a test case to perform Web Services testing.
To do this, locate the Web Connect test 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 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 format of body that needs to be send. 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 Body is the data that we need to be sent 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 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 format of the file.
After successful execution, the results can be viewed in AWS:
And in Provar Desktop:
For AWS APIs with a custom lambda integration, we just need to pass the stage URL (the basic URL to perform rest request) 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 well-defined, self-contained function that represents unit of functionality. A service can exchange information from 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 that is 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
- 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 (CLI)
- Continuous integration
- AutoRABIT
- Azure DevOps
- Running a Provar CI task in Azure DevOps
- 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
- GitHub Actions
- Running a Provar CI task in GitHub Actions
- 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 CI
- Travis CI
- Jenkins
- Execution Environment Security Configuration
- Parallel Execution
- Running Provar on Linux
- Reporting
- Salesforce DX
- Git
- Team foundation server
- Version control
- Zephyr Cloud and Server
- 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 issue
- 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
- Settings
- Test Builder and test cases
- Release notes
- Version 2.7.0 Summer ’22
- Version 2.6.3
- Version 2.6.0 Spring ’22
- Version 2.5.0 Winter ’22
- Version 2.4.1
- Version 2.4.0 Summer ’21
- Version 2.3.1
- Version 2.3.0 Spring ’21
- Version 2.2.1
- Version 2.2.0 Winter ’21
- Version 2.1.1
- Version 2.1.0 Summer ’20
- Version 2.0.5
- Version 2.0.4
- Version 2.0.3 Spring ’20
- Version 1.9.12
- Version 1.9.11