Environments and Certificates
Was this helpful?
Was this helpful?
Global variables offer a streamlined way to simplify test maintenance. They are basically variables that can be created once and reused any number of times across the same project.
By creating multiple "Environments" or profiles, users can manage distinct global variables. These variables can then be referenced across any Test Script within the project.
They are particularly beneficial in the following scenarios:
When a value is reused throughout multiple tests.
When variables are required to synthetically generate data.
Step 1: Select one or multiple API.
Step 2: Under playground or Testing suite, click on Global variable.
Step 3: There will be a list of all the Global variables or if not, we can create as required.
Step 4: Click on Pre-Request Variable & add the variables accordingly. By clicking on New API button( if required)
Step 5: Click on send, and get the response results of the APIs.
Pre-request variables are needed in APIs to facilitate dynamic and flexible request handling.
This capability is crucial for scenarios where requests depend on dynamically changing data, such as authentication tokens, session IDs, or user inputs.
By utilizing pre-request variables, developers can ensure accurate and efficient API interactions, enhancing the reliability and functionality of their applications.
Step 6: Now Click on Configurations & add select global variables accordingly.
Step 7: Create a new environment if not created.
Clone Environment There is an option to clone the Variables from one environment to another environment.
Step 8: Here you need to create variable, click on New Variable.
Step 9: Define the variable name, change the variable type (if required).
Step 10: Add a global default and stag, so it will execute any API from this data for respective environments.
Step 11: Now during API testing, we can put them under different environments.
User should select the Environment from the dropdown to Create the Variables under selected environment.
User can now create environments and variables under that; This can be done across all the environments and select the particular one while execution. The default environment will be called as “Global Default”.
Step 12: Head towards Test Suite select the environment and execute tests, this will generate report on the test process.
They act as a form of digital identification, ensuring that communications between the client and the server are encrypted and authenticated. By integrating certificates into the testing phase, developers can ensure that their API requests mimic real-world secure interactions, thereby enhancing the reliability and security of their applications.
Enhanced Security: API certificates contribute to a secure communication channel by encrypting the data transmitted between the client and the server. This encryption helps protect sensitive data from interception or tampering during transit.
Authentication and Authorization: Certificates validate the identity of the server to the client and, in some configurations, the client to the server. This mutual authentication process ensures that only authorized entities can access the API, safeguarding against unauthorized access or usage.
Compliance: Many industries have regulatory requirements that mandate the use of encryption and secure data transmission methods. Utilizing API certificates helps organizations comply with these regulations, avoiding potential legal and financial penalties.
Follow these steps to use API Certificates.
Step 1: Navigate to Configuration and select Certificates.
Step 2: Click on New Certificate.
Step 3: Upload the certificate that will serve the authenticity of the API.
Step 4: Enter a unique domain name, and assign a port number and password. So, it can be accessed and used further.
Step 5: Go to playground, select the API that needs to be certified.
Step 6: Choose the certificate and click on Add certificate.
Step 7: Once accepted, the platform will notify that the certificate is added.
Step 8: If there are multiple APIs then open Test Suite, select the API suite.
Step 9: Select the certificate to add and click on Add certificate.
Step 10: In the pop-up box upload the certificate. If genuine, the platform will notify that the certificate is valid.
Step 11: Enter a unique domain name, and assign a port number and password. So, it can be accessed and used further.
Step 12: Once accepted, the platform will notify that the certificate is added.