Header
Rest API Documentation
Qualitia Automation Studio (QAS) now includes REST API capabilities, enabling seamless integration and communication with various applications and systems. The REST API functionality allows users to automate interactions, manage test cases, retrieve test execution data, and integrate QAS with CI/CD pipelines, test management tools, and other third-party platforms. By leveraging REST APIs, QAS enhances flexibility in test automation workflows, providing direct access to QAS’s core functions and enabling teams to incorporate test automation into broader DevOps and agile practices effortlessly. This advancement significantly boosts QAS's interoperability, making it a powerful choice for modern, scalable testing environments.
Common HTTP methods:
GET: Retrieves data from the server. Used to request and fetch specific information, such as reading a file, document, or other data, without modifying it.
POST: Sends data to the server to create a new resource. Commonly used to submit data, such as form entries, which the server processes to generate a new item.
PUT: Updates or replaces an existing resource on the server with the provided data. It usually requires all data for the resource, overwriting the existing content.
PATCH: Partially updates an existing resource with only the data specified in the request. Unlike PUT, it modifies only specific fields rather than replacing the entire resource.
DELETE: Removes a specified resource from the server, permanently deleting it.
Create Rest API Object
Create Rest API Object through Object Repository
To create SFDC API object follow the below steps:
Go to Object Repository.
Click the + icon (Create Object) and select HTTP option for the connection as shown in the screenshot.
Clicking HTTP will open the Create HTTP API Object screen.
On the Create HTTP API Object screen, enter the following details:
Select the HTTP method using the dropdown. You can select GET, POST, PUT, PATCH, and DELETE.
Enter URL: Enter the URL of the API.
Name: Enter the API name.
Parent: Select the parent object form the dropdown. You will see list of all the imported objects here.
Description: Add desired description for the API up to 300 characters.
Once you enter the URL, click Test & Validate.
Clicking Test & Validate will open a Response window
Click on the three dots to:
Edit: Edit the dataset.
Duplicate: Create duplicate dataset.
View JSON: View JSON for the dataset.
Delete: Delete the dataset, only if there are more than one dataset.
Click Test from the top-right corner to test the request.
Clicking Test will open a Response screen (as shown below), where you can view the test results. You can view the result in JSON or Text format.
You can also view the result on the Salesforce application. The data will be fetched, and a JSON will be created on the Salesforce application.
Click Validation Rules tab to create a validation rule for an object.
When no Validation Rule exist, you are prompted to Create a validation set.
You can also click + Create Validation Set from the top-right corner of the tabular section.
Clicking Create will open a Create Validation Set window with the following fields:Â
Name: Enter an intuitive name for the validation set that is easy to recognize.
Maximum length permitted is 300 characters including spaces.Description: A brief description about the suite.
Click Save to proceed; otherwise, click Cancel.
You can now add validation rules under the Validation Set.
Click Add Validation Rule from the validation set you created.
Clicking Add Validation Rule will open a Create Validation Rule window with the following fields:
Rule Name: Enter an intuitive name for the validation rule that is easy to recognize.
Maximum length permitted is 300 characters including spaces.Rule Type: You can select one of the three rule types.
Status Code: Select Status Code and provide the Expected Status Code to validate against it.
Response Time: Select Response Time and enter the Response Time Witnin to get the expected response in time. This value should be in milliseconds.
Property-Value: Selecting Property-Value will open few more fields:
Field Name: Enter the field name that is available for the object.
Field Type: Select the field type from the dropdown, Text, Boolean, or Integer.
Match Field Value: Select Exact Match or Contains from the dropdown as per your requirement. Exact Match will look for the same field value provided.
Value: Enter the field value you want to be in your response.
Select the check box Store field value as if you want to store the response as a Key.
Click Test Rule to validate the created rules.
Create Rest API Object through Test Case Editor
Login to QAS - Client.
Access Develop from left navigation to view Test Explorer screen.
On the Explorer section, you can view existing Test Scenarios.
Click the Expand option on a test scenario, where you can view all its test cases.
Select a test case.
Right-click on the test case and hover over Create Object.
Click Salesforce API, it will open Create Salesforce API Object screen.
Follow steps 4 to 12 from the previous section. Salesforce Application (SFDC) | Create Salesforce API Object through Object Repository.
Â
Â
Footer