Build-Test-Script
Last updated
Last updated
Select the type of API you'll be testing (REST, SOAP, GraphQL).
API type
Select REST, SOAP or GraphQL.
Name
The name of your API script.
Description
A description of your script.
Context Path
The path to your specific API.
Protocol
Defines a set of rules for communication( http/https).
Endpoint
URL where a service or resource can be accessed.
Port Number
It is network address. For example: 8080.
Verbs
The type of API call. GET, POST, PUT, DELETE or PATCH.
Timeout
Timeouts are used to avoid waiting APIs response.
URL in code Enabled
Encoding special characters within the URL.
Authorization in the context of APIs refers to the process of granting or denying access to specific resources, data, or functionalities within an API.
Type 1: Basic Authentication
Step 2: Provide the following credentials:
Enter authorized API Username.
Enter your Corresponding Password.
Type 2: OAuth 2.0 Authentication
Step 2 : Depending on the token retrieval method, do one of the following:
Option A: Access Token in Headers
Step-1 : Enter the Access Token to be added to headers.
Step-2 : Save the TestScript.
After saving the access token, it will be added in headers part along with prefix Bearer.
Option B: Access Token in Query Parameters
Step-1 : Enter the Access Token to be added to queryParams.
Step-2 : Save the TestScript.
After saving the access token, it will be added in query params.
Select Certificate
Click here to check out option to upload Certificate
Headers consist of key-value pairs that provide additional information about the request or the client.
Key-Value Pair: Headers convey metadata, authentication tokens, content type, and more to the server.
You can remove headers by clicking on the delete icon.
Path parameters are placeholders in the URL path that are replaced with actual values.
Provide Parameter Name, Parameter Value, Parameter Type details.
As they allow dynamic and resource-specific interactions, such as accessing specific endpoints or records.
Using Path Parameter in Test Script:
Note: The name of the path parameter stated in both the Header and Params section must match the path parameter name utilized in the Info of your Test Script.
Path parameters can be removed by clicking on Delete Icon.
Query parameters are appended to the URL and are used to modify the request or filter responses.
Provide Parameter Name, Parameter Value, Parameter Type details.
As they enable filtering, sorting, and customizing requests to retrieve specific data.
You can remove Query Parameters by clicking on the delete icon.
The payload of data sent in the request's body.
Typically used for POST, PUT, DELETE, and PATCH requests to send data to the server.
It include information like JSON objects, XML, or form data that the API endpoint expects.
Within the realm of API testing, assertions encompass statements or conditions that verify if the real results of API requests and responses align with the anticipated outcomes.
Various categories of assertions supported within Functional Testing:
Functional Assertions: Within API testing, Functional Assertions encompass a diverse range of validation techniques. These assertions serve the purpose of confirming the alignment between the anticipated and actual API responses. The supported assertions encompass aspects like Headers, JSON Path, XPATH, body content, and schema validation. For more comprehensive understanding Click Here
API to DB assertion: Within API testing, Functional Testing provides an array of assertions for API-to-DB validation, ensuring that API responses align as expected with corresponding database resources. For more comprehensive understanding Click Here
Step-1 : Click on Play icon to execute test.
Step-2 : Select the Environment name.
Step-3 : Then select desired Environment & click on the Run button.
Step-4 : It will be navigated to Reports Page.
Step 1: Choose the Basic Auth option.
Step 1 : Select the "OAuth 2.0" option.