Qualitia Automation Studio classifies web services actions as:
...
This action helps you skip the generic headers you set in the Rest Generic Headers tab of Project Settings.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Types |
---|---|---|---|
HeaderKey | Enter the header key which you want to skip defined in the Rest Generic Headers Settings. | Yes | String |
Example:
REST.Request.RemoveGenericHeaders "Content-type"
...
Headers set using this action will override the headers set in the Rest Generic Headers tab.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Types |
---|---|---|---|
HeaderLabel | Enter the variable name under which you want to store the key=value pair of the header. | Yes | String |
HeaderKey | Enter the header key which you want to set for the API service to be executed. | Yes | String |
HeaderValue | Enter the value for the key set above. | Yes | String |
Example:
REST.Request.SetHeaders "H1" "If-Match" "a8f34"
REST.Request.SetHeaders "H2" "accept" "application/xml"
...
You may set multiple query parameters using test data. This action must be used before executing API service.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Types |
---|---|---|---|
QueryKey | Enter the key which you want to set for the API service to be executed. | Yes | String |
QueryValue | Enter the value for the key set above. | Yes | String |
Example:
REST.Request.SetQueryParameters "draftId" "1031143439"
...
This action helps you set the basic authentication details for the API service you want to execute. Authentication details you provide here are applicable for the entire session of the test case or test suite.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Types |
---|---|---|---|
Username | Enter the username for authentication. | Yes | String |
Password | Enter the password for authentication. Password should be given in the specific format to be encrypted. Format: Encrypt(<PASSWORD>) | Yes | String |
Example:
REST.Auth.Basic "Qualitia" "Encrypt(Qualitia123)"
When the focus is moved away from the parameter, Qualitia will automatically encrypt the data ABC and result in a secured text like "vHpmlfI4R3PQkCN4sZnuqw==þNWE3ZDdkNjE3N2JmNDM2ODgxMzQwYWI1MTA3YWNjMDc="
...
This action helps you set the digest authentication details for the API service you want to execute. Authentication details you provide here are applicable for the entire session of the test case or test suite.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Types |
---|---|---|---|
Username | Enter the username for authentication. | Yes | String |
Password | Enter the password for authentication. Password should be given in the specific format to be encrypted. Format: Encrypt(<PASSWORD>) | Yes | String |
Example:
REST.Auth.Digest "Qualitia" "Encrypt(Qualitia123)"
When the focus is moved away from the parameter, Qualitia will automatically encrypt the data ABC and result in a secured text like "vHpmlfI4R3PQkCN4sZnuqw==þNWE3ZDdkNjE3N2JmNDM2ODgxMzQwYWI1MTA3YWNjMDc="
...
This action helps you set the bearer authentication details for the API service you want to execute. Authentication details you provide here are applicable for the entire session of the test case or test suite.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Types |
---|---|---|---|
Token | Enter the token to access API service you want to execute. | Yes | String |
Example:
REST.Auth.Bearer "haiosehtoiasjgpaodsjcuasworijgdsf"
...
This action helps you set the jwt authentication details for the API service you want to execute. Authentication details you provide here are applicable for the entire session of the test case or test suite.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Types |
---|---|---|---|
Token | Enter the token to access API service you want to execute. | Yes | String |
Example:
REST.Auth.JWT "haiosehtoiasjgpaodsjcuasworijgdsf"
...
It should be used prior to API service action. Action may fail if the web service takes longer than the specified time.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
timeout | Enter the timeout period in milliseconds. | Yes | String |
Example:
REST.Request.SetTimeout "200"
...
This action waits for the specified attribute to arrive in the response file after executing the service. You can set the maximum time to wait for the JSON value or XML node attribute to arrive in the response file.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
jsonPath/xpath | Enter the JSON or XML path to the attribute whose value you want to check in the API response. | Yes | String |
jsonValue/attribute | Enter the JSON value or XML attribute which you want to check. You may skip adding this parameter if you want to check only json key or xml node. | No | String |
MaxTimeLimit | Enter the time limit until when you want to check for the required data. | Yes | String |
TimeUnit | Enter the time unit to be used to set the maximum time limit. Value for this parameter can be either milliseconds or seconds. By default, system considers milliseconds when not set. | No | String |
Example:
JSON:
REST.Request.WaitForAttribute “$.address.postalCode” "" "20" "seconds"
XML:
REST.Request.WaitForAttribute “//actors/actor[@id='1']” "" "20" "seconds"
REST.Request.SetFormUrlEncodedParameters
This action helps you to add the request body data as key value pair in the form of URL encoded format. Qualitia converts the given data into the URL encoded form data. You can give multiple pairs using the test data. In order to use this action to add form data while executing any API service action, you must use this action prior to API service.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
key | Enter the key name. | Yes | String |
Value | Enter the value for the key mentioned above. | Yes | String |
Example:
REST.Request.SetFormUrlEncodedParameters "id" "23950329"
REST.Request.ImportSSLCertificate
...
For more information on how to export the SSL certificate, click here.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
CertificatePath | Enter the absolute path to the certificate file which you have exported. | No | String |
Alias | Enter an alternative name or label that refers to the certificate file which can be used to locate or access it. | Yes | String |
Password | Enter the authentication password to access the certificate file. Default password is changeit. | No | String |
Example:
REST.Request.ImportSSLCertificate "D:\SSLCertificate.cer" "SSL" "changeit"
...
This action supports XML or JSON application file types.
You can also store the information related to HTTP Status, HTTP REQUEST TIME, and Header into the variable and use these values to develop test case flow after executing this action.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Types |
---|---|---|---|
BaseURL | Enter the URL where you want to execute the API service. | Yes | String |
BasePath | Enter the base path where you want to execute API service. You can include path in the BaseURL parameter itself. In that case, you may keep this parameter blank. | No | String |
AuthenticationType | Enter authentication type you want to use while executing the API service. Values for this field can be either: Basic, Bearer, JWT, or Digest. Keeping this field blank will be taken as no authentication. For Basic, Bearer, JWT, and Digest authentication types, details will be taken from the previous steps where details are provided. | No | String |
HeaderLabel | Enter the header label in case you have specified it earlier in the test case. | No | String |
SSLFlag | Using this parameter, you can decide whether you want to consider SSL certificate while executing the API service.
External certificate files are not supported. | No | String |
ResponseFilepath | Enter the absolute path to the file where you want to store the response you get after the service is executed. File types supported are XML, HTML, TXT, and JSON. | Yes | String |
ExpectedHTTPStatusCode | You can give the http status code that you expect at the end of the API service execution. From all the available forty different status code, you can provide any value that you expect. In case you are not sure about the exact expected value, you can also give the category of http status code. For example, 1xx, 2xx, and so forth. Multiple codes or code ranges can be given separated by comma (,). | No | String |
Info |
---|
Important Notes:If the response file extension is XML and response is in JSON, the system converts XML response into JSON and vice versa. To store HTML responses, ReponseFilePath should contain file path to .html file. In case the response file extension is not matching with the file format provided by the API, the system stores the response in the file without extension. You can open such files with the help of any text editor like Notepad. |
...
Info |
---|
If the API URL contains query parameters and you want to pass the URL through baseURL and basePath separately then you need to set all the query parameters through REST.Request.SetQueryParameters action. For example: if the API Url is: https://petstore.swagger.io:443/v2/pet/findByStatus?status=available Set the query parameter "status=available" through REST.Request.SetQueryParameters action and after that step, add the GET.ExecuteAPI action along with the values of baseURL and basePath parameters as follows: |
...
REST.GET.ExecuteAPI “https://<HOST_NAME>:<PORT_NUMBER>/<REST_URL>” "ProjectMapping/OAT" "Basic" "" "False" "C:\Users\Qualitia\Request-Cust_List.xml" "200"
REST.GET.ExecuteAPI “https://<HOST_NAME>:<PORT_NUMBER>/<REST_URL>” "ProjectMapping/OAT" "Basic" "HeaderLebel" "False" "C:\Users\Qualitia\Request-Cust_List.json" "4xx"
REST.POST.ExecuteAPI
This action helps to add the desired data using POST method while executing the API service.
...
This action supports XML or JSON application file types.
You can also store the information related to HTTP Status, HTTP REQUEST TIME, and Header into the variable and use these values to develop test case flow after executing this action.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Types |
---|---|---|---|
BaseURL | Enter the URL where you want to execute the API service. | Yes | String |
BasePath | Enter the base path where you want to execute API service. You can include path in the BaseURL parameter itself. In that case, you may keep this parameter blank. | Optional | String |
RequestFilepath | Enter the absolute path to the file from which you want to post the data. File types supported are XML, HTML, TXT, and JSON. | Optional | String |
AuthenticationType | Enter authentication type you want to use while executing the API service. Values for this field can be either: Basic, Bearer, JWT, or Digest. Keeping this field blank will be taken as no authentication. For Basic, Bearer, JWT, and Digest authentication types, details will be taken from the previous steps where details are provided. | Optional | String |
HeaderLabel | Enter the header label in case you have specified it earlier in the test case/task. | Optional | String |
SSLFlag | Using this parameter, you can decide whether you want to consider SSL certificate while executing the API service.
External certificate files are not supported. | Optional | String |
ResponseFilepath | Enter the absolute path to the file where you want to store the response you get after the service is executed. File types supported are XML, HTML, TXT, and JSON. | Yes | String |
ExpectedHTTPStatusCode | You can give the http status code that you expect at the end of the API service execution. From all the available forty different status code, you can provide any value that you expect. In case you are not sure about the exact expected value, you can also give the category of http status code. For example, 1xx, 2xx, and so forth. Multiple codes or code ranges can be given separated by comma (,). | Optional | String |
Info |
---|
Important Notes:If the response file extension is XML and response is in JSON, the system converts XML response into JSON and vice versa. To store HTML responses, ReponseFilePath should contain file path to .html file. In case the response file extension is not matching with the file format provided by the API, the system stores the response in the file without extension. You can open such files with the help of any text editor like Notepad. |
Example:
REST.POST.ExecuteAPI “https://<HOST_NAME>:<PORT_NUMBER>/<REST_URL>” "ProjectMapping/OAT" "Basic" "" "False" "C:\Users\Qualitia\Request-Cust_List.xml" "2xx,3xx"
REST.POST.ExecuteAPI “https://<HOST_NAME>:<PORT_NUMBER>/<REST_URL>” "ProjectMapping/OAT" "Basic" "HeaderLebel" "False" "C:\Users\Qualitia\Request-Cust_List.json" "200,300"
REST.PUT.ExecuteAPI
This action helps to update the desired data using PUT method while executing the API service.
...
This action supports XML or JSON application file types.
You can also store the information related to HTTP Status, HTTP REQUEST TIME, and Header into the variable and use these values to develop test case flow after executing this action.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Types |
---|---|---|---|
BaseURL | Enter the URL where you want to execute the API service. | Yes | String |
BasePath | Enter the base path where you want to execute API service. You can include path in the BaseURL parameter itself. In that case, you may keep this parameter blank. | No | String |
RequestFilepath | Enter the absolute path to the file from which you want to post the data. File types supported are XML, HTML, TXT, and JSON. | No | String |
AuthenticationType | Enter authentication type you want to use while executing the API service. Values for this field can be either: Basic, Bearer, JWT, or Digest. Keeping this field blank will be taken as no authentication. For Basic, Bearer, JWT, and Digest authentication types, details will be taken from the previous steps where details are provided. | No | String |
HeaderLabel | Enter the header label in case you have specified it earlier in the test case/task. | No | String |
SSLFlag | Using this parameter, you can decide whether you want to consider SSL certificate while executing the API service.
| No | String |
ResponseFilepath | Enter the absolute path to the file where you want to store the response you get after the service is executed. File types supported are XML, HTML, TXT, and JSON. | Yes | String |
ExpectedHTTPStatusCode | You can give the http status code that you expect at the end of the API service execution. From all the available forty different status code, you can provide any value that you expect. In case you are not sure about the exact expected value, you can also give the category of http status code. For example, 1xx, 2xx, and so forth. Multiple codes or code ranges can be given separated by comma (,). | No | String |
Info |
---|
Important Notes:If the response file extension is XML and response is in JSON, the system converts XML response into JSON and vice versa. To store HTML responses, ReponseFilePath should contain file path to .html file. In case the response file extension is not matching with the file format provided by the API, the system stores the response in the file without extension. You can open such files with the help of any text editor like Notepad. |
Example:
REST.PUT.ExecuteAPI “https://<HOST_NAME>:<PORT_NUMBER>/<REST_URL>” "ProjectMapping/OAT" "Basic" "" "False" "C:\Users\Qualitia\Request-Cust_List.xml" "400"
REST.PUT.ExecuteAPI “https://<HOST_NAME>:<PORT_NUMBER>/<REST_URL>” "ProjectMapping/OAT" "Basic" "HeaderLebel" "False" "C:\Users\Qualitia\Request-Cust_List.json" "2xx,400"
REST.PATCH.ExecuteAPI
Info |
---|
This action is supported on Qualitia Automation Studio v8.0.2 and above. |
...
You can also store the information related to HTTP Status, HTTP REQUEST TIME, and Header, and use them as input values for the remaining steps of the test case.
Parameter Name | Parameter Description | Mandatory | Data |
---|---|---|---|
BaseURL | Enter the URL where you want to execute the API service. Also, you can include BasePath in the URL. | Yes | String |
BasePath | Enter the base path where you want to execute the API service. Note: Do not enter any value If the BaseURL includes the base path. | No | String |
RequestFilepath | Enter the absolute path for the request file. The Request file must be in any one of the following formats:
| No | String |
AuthenticationType | Enter any one of the following authentication service type:
Note: The associated authentication parameters must be defined in the previous steps. Do not enter any value if the API service does not use any authentication service. | No | String |
HeaderLabel | Enter the header label if you have specified it in the previous steps of the current test case or task. | No | String |
SSLFlag | Specify whether to consider SSL certificate for executing the API service.
| No | String |
ResponseFilepath | Enter the absolute path of the file to store the response data. The response file must be in one of the following formats:
| Yes | String |
ExpectedHTTPStatusCode | After the execution of API service, a specific HTTP status code is returned. Do one of the following:
| No | String |
Important Notes:
If the response file extension is XML and the response is returned in JSON, Qualitia Automation Studio converts XML response into JSON and vice-versa.
...
This action supports XML or JSON application file types.
You can also store the information related to HTTP Status, HTTP REQUEST TIME, and Header into the variable and use these values to develop test case flow after executing this action.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Types |
---|---|---|---|
BaseURL | Enter the URL where you want to execute the API service. | Yes | String |
BasePath | Enter the base path where you want to execute API service. You can include path in the BaseURL parameter itself. In that case, you may keep this parameter blank. | No | String |
RequestFilepath | Enter the absolute path to the file from which you want to post the data. File types supported are XML, HTML, TXT, and JSON. | No | String |
AuthenticationType | Enter authentication type you want to use while executing the API service. Values for this field can be either: Basic, Bearer, JWT, or Digest. Keeping this field blank will be taken as no authentication. For Basic, Bearer, JWT, and Digest authentication types, details will be taken from the previous steps where details are provided. | No | String |
HeaderLabel | Enter the header label in case you have specified it earlier in the test case/task. | No | String |
SSLFlag | Using this parameter, you can decide whether you want to consider SSL certificate while executing the API service.
External certificate files are not supported. | No | String |
ResponseFilepath | Enter the absolute path to the file where you want to store the response you get after the service is executed. File types supported are XML, HTML, TXT, and JSON. | Yes | String |
ExpectedHTTPStatusCode | You can give the http status code that you expect at the end of the API service execution. From all the available forty different status code, you can provide any value that you expect. In case you are not sure about the exact expected value, you can also give the category of http status code. For example, 1xx, 2xx, and so forth. Multiple codes or code ranges can be given separated by comma (,). | No | String |
Info |
---|
Important Notes:If the response file extension is XML and response is in JSON, the system converts XML response into JSON and vice versa. To store HTML responses, ReponseFilePath should contain file path to .html file. In case the response file extension is not matching with the file format provided by the API, the system stores the response in the file without extension. You can open such files with the help of any text editor like Notepad. |
...
REST.DELETE.ExecuteAPI “https://<HOST_NAME>:<PORT_NUMBER>/<REST_URL>” "ProjectMapping/OAT" "Basic" "" "False" "C:\Users\Qualitia\Request-Cust_List.xml" "300"
REST.DELETE.ExecuteAPI “https://<HOST_NAME>:<PORT_NUMBER>/<REST_URL>” "ProjectMapping/OAT" "Basic" "HeaderLebel" "False" "C:\Users\Qualitia\Request-Cust_List.json" "500,2xx"
REST.GET.ExecuteAPIFormData
This action helps to pull the desired information using GET method while executing the API service with the help of form-data. The form-data can contain one or multiple sets of key-value pairs which will eventually help in executing the specified request method.
This action can work independently or it can be used in a combination of other REST actions like REST.Request.SetGenericHeaders, REST.Request.SetHeaders, REST.Request.SetQueryParameters, REST.Auth.Basic/Digest/Bearer/JWT, based on the test case requirements.
You can also store the information related to HTTP Status, HTTP REQUEST TIME, and Header into the variable and use these values to develop test case flow after executing this action.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Types |
---|---|---|---|
BaseURL | Enter the URL where you want to execute the API service. | Yes | String |
BasePath | Enter the base path where you want to execute API service. You can include path in the BaseURL parameter itself. In that case, you may keep this parameter blank. | No | String |
AuthenticationType | Enter authentication type you want to use while executing the API service. Values for this field can be either: Basic, Bearer, JWT, or Digest. Keeping this field blank will be taken as no authentication. For Basic, Bearer, JWT, and Digest authentication types, details will be taken from the previous steps where details are provided. | No | String |
HeaderLabel | Enter the header label in case you have specified it earlier in the test case/task. | No | String |
SSLFlag | Using this parameter, you can decide whether you want to consider SSL certificate while executing the API service.
External certificate files are not supported. | No | String |
ResponseFilepath | Enter the absolute path to the file where you want to store the response you get after the service is executed. | Yes | String |
ExpectedHTTPStatusCode | You can give the http status code that you expect at the end of the API service execution. From all the available forty different status code, you can provide any value that you expect. In case you are not sure about the exact expected value, you can also give the category of http status code. For example, 1xx, 2xx, and so forth. Multiple codes or code ranges can be given separated by comma (,). | No | String |
Info |
---|
Important Notes:If the response file extension is XML and response is in JSON, the system converts XML response into JSON and vice versa. To store HTML responses, ReponseFilePath should contain file path to .html file. In case the response file extension is not matching with the file format provided by the API, the system stores the response in the file without extension. You can open such files with the help of any text editor like Notepad. |
...
REST.GET.ExecuteAPIFormData “https://<HOST_NAME>:<PORT_NUMBER>/<REST_URL>” "ProjectMapping/OAT” “Bearer” "HeaderLabel1” "True" “C:\Users\Qualitia\Reponse-Cust_List.json” "3xx"
REST.POST.ExecuteAPIFormData
This action helps to add desired information using POST method while executing the API service with the help of form-data. The form-data can contain one or multiple sets of key-value pairs which will eventually help in executing the specified request method.
This action can work independently or it can be used in a combination of other REST actions like REST.Request.SetGenericHeaders, REST.Request.SetHeaders, REST.Request.SetQueryParameters, REST.Auth.Basic/Digest/Bearer/JWT, based on the test case requirements.
You can also store the information related to HTTP Status, HTTP REQUEST TIME, and Header into the variable and use these values to develop test case flow after executing this action.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Types |
---|---|---|---|
BaseURL | Enter the URL where you want to execute the API service. | Yes | String |
BasePath | Enter the base path where you want to execute API service. You can include path in the BaseURL parameter itself. In that case, you may keep this parameter blank. | No | String |
FormData | Enter the key value pairs of the form data to be used while executing the service. Multiple pairs should be separated by a caret sign (^). This parameter is case-insensitive. If you want to use file to provide form data, add all the form data in some file and provide absolute path to that file as a parameter. Data in the file should be well formatted. For example, File=C:\Users\Qualitia\Request-Cust_List.json | No | Array |
AuthenticationType | Enter authentication type you want to use while executing the API service. Values for this field can be either: Basic, Bearer, JWT or Digest. Keeping this field blank will be taken as no authentication. For Basic, Bearer, JWT, and Digest authentication types, details will be taken from the previous steps where details are provided. | No | String |
HeaderLabel | Enter the header label in case you have specified it earlier in the test case/task. | No | String |
SSLFlag | Using this parameter, you can decide whether you want to consider SSL certificate while executing the API service.
External certificate files are not supported. | No | String |
ResponseFilepath | Enter the absolute path to the file where you want to store the response you get after the service is executed. | Yes | String |
ExpectedHTTPStatusCode | You can give the http status code that you expect at the end of the API service execution. From all the available forty different status code, you can provide any value that you expect. In case you are not sure about the exact expected value, you can also give the category of http status code. For example, 1xx, 2xx, and so forth. Multiple codes or code ranges can be given separated by comma (,). | Optional | String |
Info |
---|
Important Notes:If the response file extension is XML and response is in JSON, the system converts XML response into JSON and vice versa. To store HTML responses, ReponseFilePath should contain file path to .html file. In case the response file extension is not matching with the file format provided by the API, the system stores the response in the file without extension. You can open such files with the help of any text editor like Notepad. |
...
REST.POST.ExecuteAPIFormData “https://<HOST_NAME>:<PORT_NUMBER>/<REST_URL>” "ProjectMapping/OAT” "File=C:\Users\Qualitia\Request-Cust_List.json" “Bearer” "HeaderLabel1” "True" “C:\Users\Qualitia\Reponse-Cust_List.json” "3xx"
REST.PUT.ExecuteAPIFormData
This action helps to update desired information using PUT method while executing the API service with the help of form-data. The form-data can contain one or multiple sets of key-value pairs which will eventually help in executing the specified request method.
This action can work independently or it can be used in a combination of other REST actions like REST.Request.SetGenericHeaders, REST.Request.SetHeaders, REST.Request.SetQueryParameters, REST.Auth.Basic/Digest/Bearer/JWT, based on the test case requirements.
You can also store the information related to HTTP Status, HTTP REQUEST TIME, and Header into the variable and use these values to develop test case flow after executing this action.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Types |
---|---|---|---|
BaseURL | Enter the base URL where you want to execute the API service. | Yes | String |
BasePath | Enter the base path where you want to execute API service. You can include path in the BaseURL parameter itself. In that case, you may keep this parameter blank. | No | String |
FormData | Enter the key value pairs of the form data to be used while executing the service. Multiple pairs should be separated by a caret sign (^). If you want to use file to provide form data, add all the form data in some file and provide absolute path to that file as a parameter. Data in the file should be well formatted. | No | Array |
AuthenticationType | Enter authentication type you want to use while executing the API service. Values for this field can be either: Basic, Bearer, JWT or Digest. Keeping this field blank will be taken as no authentication. For Basic, Bearer, JWT, and Digest authentication types, details will be taken from the previous steps where details are provided. | No | String |
HeaderLabel | Enter the header label in case you have specified it earlier in the test case/task. | No | String |
SSLFlag | Using this parameter, you can decide whether you want to consider SSL certificate while executing the API service.
External certificate files are not supported. | No | String |
ResponseFilepath | Enter the absolute path to the file where you want to store the response you get after the service is executed. | Yes | String |
ExpectedHTTPStatusCode | You can give the http status code that you expect at the end of the API service execution. From all the available forty different status code, you can provide any value that you expect. In case you are not sure about the exact expected value, you can also give the category of http status code. For example, 1xx, 2xx, and so forth. Multiple codes or code ranges can be given separated by comma (,). | No | String |
Info |
---|
Important Notes:If the response file extension is XML and response is in JSON, the system converts XML response into JSON and vice versa. To store HTML responses, ReponseFilePath should contain file path to .html file. In case the response file extension is not matching with the file format provided by the API, the system stores the response in the file without extension. You can open such files with the help of any text editor like Notepad. |
...
REST.PUT.ExecuteAPIFormData “https://<HOST_NAME>:<PORT_NUMBER>/<REST_URL>” "ProjectMapping/OAT” "File=C:\Users\Qualitia\Request-Cust_List.json" “Bearer” "HeaderLabel1” "True" “C:\Users\Qualitia\Reponse-Cust_List.json” "3xx"
REST.DELETE.ExecuteAPIFormData
This action helps to remove desired information using DELETE method while executing the API service with the help of form-data. The form-data can contain one or multiple sets of key-value pairs which will eventually help in executing the specified request method.
This action can work independently or it can be used in a combination of other REST actions like REST.Request.SetGenericHeaders, REST.Request.SetHeaders, REST.Request.SetQueryParameters, REST.Auth.Basic/Digest/Bearer/JWT, based on the test case requirements.
You can also store the information related to HTTP Status, HTTP REQUEST TIME, and Header into the variable and use these values to develop test case flow after executing this action.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Types |
---|---|---|---|
BaseURL | Enter the base URL where you want to execute the API service. | Yes | String |
BasePath | Enter the base path where you want to execute API service. You can include path in the BaseURL parameter itself. In that case, you may keep this parameter blank. | No | String |
FormData | Enter the key value pairs of the form data to be used while executing the service. Multiple pairs should be separated by a caret sign (^). If you want to use file to provide form data, add all the form data in some file and provide absolute path to that file as a parameter. Data in the file should be well formatted. | No | Array |
AuthenticationType | Enter authentication type you want to use while executing the API service. Values for this field can be either: Basic, Bearer, JWT, or Digest. Keeping this field blank will be taken as no authentication. For Basic, Bearer, JWT, and Digest authentication types, details will be taken from the previous steps where details are provided. | No | String |
HeaderLabel | Enter the header label in case you have specified it earlier in the test case/task. | No | String |
SSLFlag | Using this parameter, you can decide whether you want to consider SSL certificate while executing the API service.
External certificate files are not supported. | No | String |
ResponseFilepath | Enter the absolute path to the file where you want to store the response you get after the service is executed. | Yes | String |
ExpectedHTTPStatusCode | You can give the http status code that you expect at the end of the API service execution. From all the available forty different status code, you can provide any value that you expect. In case you are not sure about the exact expected value, you can also give the category of http status code. For example, 1xx, 2xx, and so forth. Multiple codes or code ranges can be given separated by comma (,). | No | String |
Info |
---|
Important Notes:If the response file extension is XML and response is in JSON, the system converts XML response into JSON and vice versa. To store HTML responses, ReponseFilePath should contain file path to .html file. In case the response file extension is not matching with the file format provided by the API, the system stores the response in the file without extension. You can open such files with the help of any text editor like Notepad. |
...
REST.DELETE.ExecuteAPIFormData “https://<HOST_NAME>:<PORT_NUMBER>/<REST_URL>” "ProjectMapping/OAT” "File=C:\Users\Qualitia\Request-Cust_List.json" “Bearer” "HeaderLabel1” "True" “C:\Users\Qualitia\Reponse-Cust_List.json” "400"
REST.GET.ExecuteAPIDownloadRawData
This action helps to pull the desired information using GET method. You can download raw data file after executing the action giving the desired download location.
This action can work independently or it can be used in a combination of other REST actions like REST.Request.SetGenericHeaders, REST.Request.SetHeaders, REST.Request.SetQueryParameters, REST.Auth.Basic/Digest/Bearer/JWT, based on the test case requirements.
You can also store the information related to HTTP Status, HTTP REQUEST TIME, and Header into the variable and use these values to develop test case flow after executing this action.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Types |
---|---|---|---|
BaseURL | Enter the URL where you want to execute the API service. | Yes | String |
BasePath | Enter the base path where you want to execute API service. You can include path in the BaseURL parameter itself. In that case, you may keep this parameter blank. | No | String |
AuthenticationType | Enter authentication type you want to use while executing the API service. Values for this field can be either: Basic, Bearer, JWT or Digest. Keeping this field blank will be taken as no authentication. For Basic, Bearer, JWT, and Digest authentication types, details will be taken from the previous steps where details are provided. | No | String |
HeaderLabel | Enter the header label in case you have specified it earlier in the test case/task. | No | String |
SSLFlag | Using this parameter, you can decide whether you want to consider SSL certificate while executing the API service.
External certificate files are not supported. | No | String |
ResponseFilepath | Enter the absolute path to the file where you want to store the response you get after the service is executed. | Yes | String |
DownloadLocation | Enter the folder directory location where you want to store the raw data after executing the test case. | No | String |
| You can give the http status code that you expect at the end of the API service execution. From all the available forty different status code, you can provide any value that you expect. In case you are not sure about the exact expected value, you can also give the category of http status code. For example, 1xx, 2xx, and so forth. Multiple codes or code ranges can be given separated by comma (,). | No | String |
Info |
---|
Important Notes:If the response file extension is XML and response is in JSON, the system converts XML response into JSON and vice versa. To store HTML responses, ReponseFilePath should contain file path to .html file. In case the response file extension is not matching with the file format provided by the API, the system stores the response in the file without extension. You can open such files with the help of any text editor like Notepad. |
...
REST.GET.ExecuteAPIDownloadRawData “https://<HOST_NAME>:<PORT_NUMBER>/<REST_URL>” "ProjectMapping/OAT” “Bearer” "HeaderLabel1” "True" “C:\Users\Qualitia\Reponse-Cust_List.json” "D:\New Folder\RawDataFiles" "300"
REST.PUT.ExecuteAPIDownloadRawData
This action helps to update desired information using PUT method. It uses raw data while executing API service. You can download raw data file after executing the action giving desired download location.
This action can work independently or it can be used in a combination of other REST actions like REST.Request.SetGenericHeaders, REST.Request.SetHeaders, REST.Request.SetQueryParameters, REST.Auth.Basic/Digest/Bearer/JWT, based on the test case requirements.
You can also store the information related to HTTP Status, HTTP REQUEST TIME, and Header into the variable and use these values to develop test case flow after executing this action.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Types |
---|---|---|---|
BaseURL | Enter the URL where you want to execute the API service. | Yes | String |
BasePath | Enter the base path where you want to execute API service. You can include path in the BaseURL parameter itself. In that case, you may keep this parameter blank. | No | String |
RequestFilepath | Enter the absolute path to the file which has REST request-related information. In this file, you can specify the details which you want to update. | No | |
AuthenticationType | Enter authentication type you want to use while executing the API service. Values for this field can be either: Basic, Bearer, JWT, or Digest. Keeping this field blank will be taken as no authentication. For Basic, Bearer, JWT, and Digest authentication types, details will be taken from the previous steps where details are provided. | No | String |
HeaderLabel | Enter the header label in case you have specified it earlier in the test case/task. | No | String |
SSLFlag | Using this parameter, you can decide whether you want to consider SSL certificate while executing the API service.
| No | String |
ResponseFilepath | Enter the absolute path to the file where you want to store the response you get after the service is executed. | Yes | String |
DownloadLocation | Enter the folder directory location where you want to store the raw data after executing the test case. | No | String |
ExpectedHTTPStatusCode | You can give the http status code that you expect at the end of the API service execution. From all the available forty different status code, you can provide any value that you expect. In case you are not sure about the exact expected value, you can also give the category of http status code. For example, 1xx, 2xx, and so forth. Multiple codes or code ranges can be given separated by comma (,). | No | String |
Info |
---|
Important Notes:If the response file extension is XML and response is in JSON, the system converts XML response into JSON and vice versa. To store HTML responses, ReponseFilePath should contain file path to .html file. In case the response file extension is not matching with the file format provided by the API, the system stores the response in the file without extension. You can open such files with the help of any text editor like Notepad. |
...
REST.PUT.ExecuteAPIDownloadRawData “https://<HOST_NAME>:<PORT_NUMBER>/<REST_URL>” "ProjectMapping/OAT” “C:\Users\Qualitia\Request-Cust_List.json” “Bearer” "HeaderLabel1” "True" “C:\Users\Qualitia\Reponse-Cust_List.json” "D:\New Folder\RawDataFiles" "300"
REST.POST.ExecuteAPIDownloadRawData
This action helps to add desired information using POST method. It uses raw data while executing API service. You can download raw data file after executing the action giving desired download location.
This action can work independently or it can be used in a combination of other REST actions like REST.Request.SetGenericHeaders, REST.Request.SetHeaders, REST.Request.SetQueryParameters, REST.Auth.Basic/Digest/Bearer/JWT, based on the test case requirements.
You can also store the information related to HTTP Status, HTTP REQUEST TIME, and Header into the variable and use these values to develop test case flow after executing this action.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Types |
---|---|---|---|
BaseURL | Enter the URL where you want to execute the API service. | Yes | String |
BasePath | Enter the base path where you want to execute API service. You can include path in the BaseURL parameter itself. In that case, you may keep this parameter blank. | Optional | String |
RequestFilepath | Enter the absolute path to the file which has REST request-related information. In this file, you can specify the details which you want to add. | ||
AuthenticationType | Enter authentication type you want to use while executing the API service. Values for this field can be either: Basic, Bearer, JWT, or Digest. Keeping this field blank will be taken as no authentication. For Basic, Bearer, JWT, and Digest authentication types, details will be taken from the previous steps where details are provided. | Optional | String |
HeaderLabel | Enter the header label in case you have specified it earlier in the test case/task. | Optional | String |
SSLFlag | Using this parameter, you can decide whether you want to consider SSL certificate while executing the API service.
External certificate files are not supported. | Optional | String |
ResponseFilepath | Enter the absolute path to the file where you want to store the response you get after the service is executed. | Yes | String |
DownloadLocation | Enter the folder directory location where you want to store the raw data after executing the test case. | Yes | String |
ExpectedHTTPStatusCode | You can give the http status code that you expect at the end of the API service execution. From all the available forty different status code, you can provide any value that you expect. In case you are not sure about the exact expected value, you can also give the category of http status code. For example, 1xx, 2xx, and so forth. Multiple codes or code ranges can be given separated by comma (,). | Optional | String |
Info |
---|
Important Notes:If the response file extension is XML and response is in JSON, the system converts XML response into JSON and vice versa. To store HTML responses, ReponseFilePath should contain file path to .html file. In case the response file extension is not matching with the file format provided by the API, the system stores the response in the file without extension. You can open such files with the help of any text editor like Notepad. |
...
REST.POST.ExecuteAPIDownloadRawData “https://<HOST_NAME>:<PORT_NUMBER>/<REST_URL>” "ProjectMapping/OAT” “C:\Users\Qualitia\Request-Cust_List.json” “Bearer” "HeaderLabel1” "True" “C:\Users\Qualitia\Reponse-Cust_List.json” "D:\New Folder\RawDataFiles" "300"
REST.DELETE.ExecuteAPIDownloadRawData
This action helps to delete desired information using DELETE method. It uses raw data while executing API service. You can download raw data file after executing the action giving desired download location.
This action can work independently or it can be used in a combination of other REST actions like REST.Request.SetGenericHeaders, REST.Request.SetHeaders, REST.Request.SetQueryParameters, REST.Auth.Basic/Digest/Bearer/JWT, based on the test case requirements.
You can also store the information related to HTTP Status, HTTP REQUEST TIME, and Header into the variable and use these values to develop test case flow after executing this action.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Types |
---|---|---|---|
BaseURL | Enter the URL where you want to execute the API service. | Yes | String |
BasePath | Enter the base path where you want to execute API service. You can include path in the BaseURL parameter itself. In that case, you may keep this parameter blank. | Optional | String |
RequestFilepath | Enter the absolute path to the file which has REST request-related information. In this file, you can specify the details which you want to DELETE. | ||
AuthenticationType | Enter authentication type you want to use while executing the API service. Values for this field can be either: Basic, Bearer, JWT, or Digest. Keeping this field blank will be taken as no authentication. For Basic, Bearer, JWT, and Digest authentication types, details will be taken from the previous steps where details are provided. | Optional | String |
HeaderLabel | Enter the header label in case you have specified it earlier in the test case/task. | Optional | String |
SSLFlag | Using this parameter, you can decide whether you want to consider SSL certificate while executing the API service.
External certificate files are not supported. | Optional | String |
ResponseFilepath | Enter the absolute path to the file where you want to store the response you get after the service is executed. | Yes | String |
DownloadLocation | Enter the folder directory location where you want to store the raw data after executing the test case. | Yes | String |
ExpectedHTTPStatusCode | You can give the http status code that you expect at the end of the API service execution. From all the available forty different status code, you can provide any value that you expect. In case you are not sure about the exact expected value, you can also give the category of http status code. For example, 1xx, 2xx, and so forth. Multiple codes or code ranges can be given separated by comma (,). | Optional | String |
Info |
---|
Important Notes:If the response file extension is XML and response is in JSON, the system converts XML response into JSON and vice versa. To store HTML responses, ReponseFilePath should contain file path to .html file. In case the response file extension is not matching with the file format provided by the API, the system stores the response in the file without extension. You can open such files with the help of any text editor like Notepad. |
...
REST.DELETE.ExecuteAPIDownloadRawData “https://<HOST_NAME>:<PORT_NUMBER>/<REST_URL>” "ProjectMapping/OAT” “C:\Users\Qualitia\Request-Cust_List.json” “Bearer” "HeaderLabel1” "True" “C:\Users\Qualitia\Reponse-Cust_List.json” "D:\New Folder\RawDataFiles" "300"
REST.Response.StoreStatusCode
...
This action has to be used immediately followed by the API service action.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Types |
---|---|---|---|
key | Enter the variable name under which you want to store the status code of the API service executed. | Yes | String |
Example:
REST.Response.StoreStatusCode "Status"
...
This action has to be used immediately followed by the API service action.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Types |
---|---|---|---|
key | Enter the variable name under which you want to store the header data of the API service executed. | Yes | String |
Example:
REST.Response.StoreHeaders "HeaderData"
...
This action stores the specified header value from the response given by API service under the specified key. You can then use the stored value based on your test case requirements.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Types |
---|---|---|---|
key | Enter the variable name under which you want to store the header value of the specified key. | Yes | String |
HeaderKey | Enter the header key whose value you want to store from the response header. | Yes | String |
Example:
REST.Response.StoreHeaderValue "Key" "Content-type"
...
This action verifies the status of the API service executed against the status specified by the user. This helps in deciding the test case or test suite flow based on the API service status.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Types |
---|---|---|---|
Key | This is the variable name under which the status is stored using the REST.StoreStatusCode action. | Yes | String |
ExpectedStatus | Enter the expected status here to verify against the actual status of the API service executed. | Yes | String |
Example:
REST.Response.VerifyStatusCode "Status" "ExpectedStatus"
...
You can give multiple sets of key and value pairs using test data.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Types |
---|---|---|---|
Key | This takes key-value pair . Example: Content-Type=text/html | Yes | String |
HeaderKey | This is the key from key-value pair that is provided in 1st parameter. Example: Content-Type | Yes | String |
HeaderValue | This is the value from key-value pair that is provided in 1st parameter. Example: text/html | Yes | String |
Example
REST.Response.VerifyHeaders Content-Type=text/html Content-Type text/html
...
This action helps in storing the response time (in milliseconds) taken by the API service to fetch the response. You can give the desired variable to store the time. The value stored under the variable can be retrieved using the key name.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
key | Enter the key name under which you want to store the time taken to execute the API service in milliseconds. | Yes | String |
Example:
REST.Response.StoreResponseTime "Key"
...
This action verifies the response time by comparing the time taken to execute the API service to the expected time according to the specified operator.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
key | Enter the key name under which you want to store the time taken to execute the API service in milliseconds. | Yes | String |
expectedTime | Enter the expected time to compare to the actual time taken to execute the API service. | Yes | String |
timeUnit | Enter the time unit using which you want use while storing and comparing the time. Value for this parameter can be either milliseconds or seconds. By default, system considers milliseconds when not set. | No | String |
operator | Values for this parameter can be either "< or >".
| No | String |
Example:
REST.Response.CompareResponseTime "Key" "20" "seconds" "<"
...
URLs with invalid/expired SSL certificates are not supported.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
BaseUrl | Enter the base URL where you want to execute the request. | Yes | String |
ApiMethod | Enter the API method you want to execute on the specified URL. | Yes | String |
RequestMethod | Enter the method you want to execute on the API url mentioned above. | Yes | String |
RequestJsonFilePath | Enter the absolute path to the file which has REST request related information in the JSON format. In this file, you can enter the details which you want to Get, Push and so forth. | No | String |
ResultJsonFilePath | Enter the absolute path to the file in which you want to store the REST result. | No | String |
AuthenticationType | Enter the authentication type you want to use when executing the REST request. Qualitia supports Basic authentication types. | No | String |
UserName | Enter the username if the authentication type selected is Basic. | No | String |
Password | Enter the password if the authentication type selected is Basic. | No | String |
RequestHeader | Enter the request headers you want to pass when executing the REST request. Multiple headers should be separated by semi colon (;). | No | String |
Example:
REST.ExecuteService “https://<HOST_NAME>:<PORT_NUMBER>/<REST_URL>” "ProjectMapping/OAT" “POST” “C:\Users\Qualitia\Request-Cust_List.json” “C:\Users\Qualitia\Response-Cust_List.json” "Basic" “john.doe@gmail.com” “john.doe@123” "Content-Type=application/x-www-;Authentication=Basic fasdhlsdv"
...
You can store the information related to HTTP Status and Header into the variable and use these values to develop test case flow after executing this action.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
URL | Enter the complete REST URL. | Yes | String |
RequestMethod | Enter the method you want to execute on the API url mentioned above. | Yes | String |
RequestJsonFilePath | Enter the absolute path to the file which has REST request related information in the JSON format. In this file, you can enter the details which you want to Get, Push and so forth. | No | String |
ResultJsonFilePath | Enter the absolute path to the file in which you want to store the REST result. | No | String |
AuthenticationType | Enter the authentication type you want to use when executing the REST request. Qualitia supports Basic authentication types. | No | String |
UserName | Enter the username if the authentication type selected is Basic. | No | String |
Password | Enter the password if the authentication type selected is Basic. | No | String |
RequestHeader | Enter the request headers you want to pass when executing the REST request. Multiple headers should be separated by semi colon (;). | No | String |
SSLCertificateVerification | You can use this parameter to enable or disable the SSL certificate while executing this action.
| No | String |
Example:
REST.ExecuteAPIService “https://<HOST_NAME>:<PORT_NUMBER>/<REST_URL>” "POST” “C:\Users\Qualitia\Request-Cust_List.json” “C:\Users\Qualitia\Response-Cust_List.json” "Basic" “john.doe@gmail.com” “john.doe@123” "Content-Type=application/x-www-;Authentication=Basic fasdhlsdv" "True"
...
URLs with invalid/expired SSL certificates are not supported.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
ServiceUrl | Enter the service URL where you want to execute the request. | Yes | String |
SoapAction | Specify the method from your SOAP requests which you want to execute here. | No | String |
RequestMethod | Enter method you want to execute on the specified URL. | Yes | String |
RequestXmlPath | Enter the absolute path to the file which has REST request related information in the JSON format. In this file, you can enter the details which you want to Get, Push and so forth. | No | String |
ResponseXmlPath | Enter the absolute path to the XML file where the results will be stored. | Yes | String |
requestHeaders | Enter the request headers you want to pass when executing the REST request. Multiple headers should be separated by semi colon (;). | No | String |
Example:
SOAP.ExecuteService “https://<HOST_NAME>:<PORT_NUMBER>/<REST_URL>” "ProjectMapping/OAT" “POST” “C:\Users\Qualitia\Request-Cust_List.xml” “C:\Users\Qualitia\Response-Cust_List.xml” "Content-Type=application/x-www-;Authentication=Basic fasdhlsdv"
...
Qualitia Automation Studio contains the following actions to perform operations on JSON files.
JSON.ValidateStringSyntaValidateStringSyntax
Also, you can use ValidateStringSyntaxinFile to validates the syntax of XML or JSON file.
...
If you want to add multiple values under the key, you must give values in the correct format accordingly.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Types |
---|---|---|---|
FilePath | Enter the absolute file path to the JSON file where you want to add the node. | Yes | String |
JSONPath | Enter the JSON path where you want to add the new node. Use $ if you want to add node at root level. | Yes | String |
JSONKey | Enter the key of the node to be added in the JSON file. | No | String |
JSONValue | Enter the value to be added for the key mentioned above. | No | String |
JSONValueType | Enter the data type of the value being added as a value. Value type can be Boolean or Numeric. Keep the value type blank in case the data type is JSONObject, JSONArray, or String. | No | String |
Example:
Adding node with single value:
JSON.AddNode “C:\Users\Qualitia\Cust_Details.json” “$.address” “PostalCode” "6932331" "Numeric"
End of the execution, this action add a new node as state and value as California under the node address.
Adding node with an array:
JSON.AddNode “C:\Users\Qualitia\Cust_Details.json” “$.address” “StateCode” "["CA" , "California"]" ""
End of the execution, this action add a new node as state and value as CA and California under the node address.
JSON.AddNode “C:\Users\Qualitia\Cust_Details.json” “$.phoneNumbers” “ ” "~{ "type" : "landline", "number": "0123-4567-3263" ~}" ""
End of the execution, this action add a new node as to display landline number inside the node phoneNumbers.
...
This action removes the specified node from specified JSON file.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Types |
---|---|---|---|
FilePath | Enter the absolute file path to the JSON file from which you want to remove the node. | Yes | String |
JSONPath | Enter the node path which you want to remove from the specified file. This action will remove all the data present inside the node including array. If JSON path contains array, ensure you use an [] with index. Index starts from 0. | Yes | String |
Example:
JSON.RemoveNode “C:\Users\Qualitia\Cust_Details.json” “$.address.postalCode”
End of the execution, the node postalCode will be removed from the JSON file.
JSON.ConvertStringToFile
...
In case the JSON file does not exist at the specified location, this action creates a new JSON file. Also, if the file contains some data, this action will overwrite old data with new data.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Types |
---|---|---|---|
JSONString | Enter the JSON string which you want to add in the JSON file. | Yes | String |
OutputJSONFilePath | Enter the directory where you want to store the JSON file. | Yes | String |
Example:
JSON.ConvertStringToFile "~{ "firstName": "John", "lastName" : "doe", "age" : 26 ~}" “C:\Users\Qualitia\Cust_list.json”
End of the execution, a JSON new file will be added under the specified location with data as provided here.
JSON.ValidateStringSyntax
This action validates the JSON data given in the parameter.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Types |
---|---|---|---|
JSONString | Enter the JSON string which you want to validate. | Yes | String |
Example:
JSON.ValidateStringSyntax "~{ "firstName": "John", "lastName" : "doe", "age" : 26 ~}"
End of the execution, if the data is valid, action will pass, else action will fail.
JSON.StoreArray
This action stores the array data from the specified JSON path under the specified key. The key value can be retrieved using the key name.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Types |
---|---|---|---|
FilePath | Enter the absolute path to the JSON file from which you want to get and store array data. | Yes | String |
JSONPath | Enter the JSON path whose data you want to get and store under the specified key. If JSON path contains array, ensure you use an [] with index. Index starts from 0. | Yes | String |
Key | Enter the key under which you want to store the array data. | Yes | String |
Example:
JSON.StoreArray "C:\Users\Qualitia\Cust_Details.json" "$.phoneNumbers" "PhoneNumbers"
End of the execution, the array data present under the phoneNumbers JSON key will be stored under the PhoneNumbers key.
JSON.StoreAllUniqueKey
This action stores all the keys present in the JSON file. Multiple keys are stored separated by comma.
While executing this action, multiple instances of single key are counted as a single instance and it will be stored only once.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Types |
---|---|---|---|
FilePath | Enter the absolute path to the JSON file from which you want to get and store keys. | Yes | String |
Key | Enter the key under which you want to store the JSON keys. | Yes | String |
Example:
JSON.StoreAllUniqueKey "C:\Users\Qualitia\Cust_Details.json" "AllKeys"
End of the execution, the complete list of JSON keys will be stored under the AllKeys key. Here AllKeys will store "firstName","lastName","age","address","streetAddress","city","postalCode","phoneNumbers","type","number".
...
While executing this action, multiple instances of single key are counted as a single instance and it will be counted only once.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Types |
---|---|---|---|
FilePath | Enter the absolute path to the JSON file from which you want to get and store total key count. | Yes | String |
Key | Enter the key under which you want to store the JSON key count. | Yes | String |
Example:
JSON.StoreTotalKeyCount "C:\Users\Qualitia\Cust_Details.json" "TotalKeyCount"
End of the execution, the total number of keys will be stored under the TotalKeyCount (here, 10) key.
JSON.StoreSpecificKeyCount
This action stores the total number of instances of specified JSON key available in JSON file. The number is stored under the specified key.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Types |
---|---|---|---|
FilePath | Enter the absolute path to the JSON file from which you want to get and store total number of instances of the specified key. | Yes | String |
JSONKey | Enter the key name for which you want to store the count. | Yes | String |
Key | Enter the key under which you want to store the JSON key count. (case-sensitive) | Yes | String |
Example:
JSON.StoreSpecificKeyCount "C:\Users\Qualitia\Cust_Details.json" "TotalKeyCount" "type"
End of the execution, the total number of instances of the key type will be stored under the variable TotalKeyCount. Here, number 2 will be stored.
...
JSON.StoreValue
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
JsonFilePath | Enter the absolute path to the JSON file from which you want to store the value. | Yes | String |
Jsonpath | Enter the path to the node (J Path) from which you want to read and store the value. | Yes | String |
strKey | Enter the key name under which you want to store the value. | Yes | String |
Example:
JSON.StoreValue “C:\Users\Qualitia\Cust_Details.json” “$.address.postalCode” “PostalCode”
This action will store the value present under the attribute postalCode under the key PostalCode.
...
This action stores the count of specified JSON node under the key. The key value can be retrieved using the key name.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
jsonFilePath | Enter the absolute path to the JSON file in which you want to set the value. | Yes | String |
Jsonpath | Enter the path to the node (J Path) to which you want to set the value. | Yes | String |
value | Enter the value which you want to set against the specified attribute. | Yes | String |
Example:
JSON.StoreJsonPathCount “C:\Users\Qualitia\Cust_Details.json” “$.address.postalCode” “630-0194”
This action will update the value of the attribute postalCode to the value given in the parameter (here 630-0194).
...
The report also displays the consolidated number of Missing properties, Incorrect values, Unequal values.
Missing properties: Gives the number of missing entities in one of the files.
Incorrect values: Gives the number of instances where JSON key is the same in both the files but value type is different.
Unequal values: Gives the number of instances where key and value type are same in both the files but value data is different.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
ActualJsonFilePath | Enter the absolute path to the JSON file path which you want to compare. | Yes | String |
ExpectedJsonFilePath | Enter the absolute path to the JSON file with which you want to compare the actual JSON file. | Yes | String |
OutputHTMLFilePath | Enter the absolute path to the HTML file in which you want to store the comparison report. | Yes | String |
MaintainSequence | Specify whether you want to consider sequence while comparing these two JSON files. Set True to consider the sequence, else, set False to ignore the sequence while comparison. | Optional | String |
Example:
JSON.CompareJson "D:\PatientDemographics.json" "D:\PatientDemo.json" "D:\PD_CompareReport.html" "True"
...
This action reads JSON file and updates the JSON key value as per the given parameter.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
jsonFilePath | Enter the absolute path to the JSON file where you want to set the value. | Yes | String |
Jsonpath | Enter the path to the node (J Path) where you want to set the value. If JSON path contains array, ensure you use an [] with index. Index starts from 0. | Yes | String |
value | Enter the value which you want to set against the specified attribute. | Yes | String |
Example:
Updating single value:
...
This action will update the value of the attribute postalCode to the value given in the parameter (here, 6300194).
Updating value from the array: (see the example below)
.UpdateValueInJson “C:\Users\Qualitia\Cust_Details.json” “$[0].address.postalCode” “6300194”
View image
XML Actions
Qualitia Automation Studio contains the following actions to perform operations on the XML files.
Also, you can use ValidateStringSyntaxinFile to validates the syntax of an XML file.
...
This action reads the specified XML file and updates the inner value of the specified node.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
XmlFilePath | Enter the absolute path to the XML file from which you want to update the value. | Yes | String |
Xpath | Enter the path to the node (Xpath) whose value you want to update. | Yes | String |
value | Enter the value which you want to add in the specified node. | Yes | String |
...
Example: Refer to the above image
XML.UpdateNodeValue “C:\Users\Qualitia\Actors_List.xml” "//actors/actor[@id='1']" “Abraham Kennedy”
...
This action reads the specified XML file and stores the inner value of the specified node under the specified key. The key value can be retrieved using the key name.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
XmlFilePath | Enter the absolute path to the XML file from which you want to get and store the value. | Yes | String |
Xpath | Enter the path to the node (XPath) from which you want to read and store the inner text. | Yes | String |
strKey | Enter the key name under which you want to store the node value (inner text from the node). | Yes | String |
Example:
XML.StoreNodeValue “C:\Users\Qualitia\Actors_List.xml” "//actors/actor[@id="3"]" “ActorName”
...
This action reads the XML file and stores the value of the specified attribute under the key. The key value can be retrieved using the key name.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
Key_Result | Enter the key name under which you want to store the attribute value. | Yes | String |
XmlFilePath | Enter the absolute path to the XML file from which you want to get and store the value. | Yes | String |
Xpath | Enter the path to the attribute (XPath) from which you want to read and store the value. | Yes | String |
AttributeName | Enter the attribute name whose value you want to store. | Yes | String |
Example:
XML.StoreAttributeValue “Key” “C:\Users\Qualitia\Actors_List.xml” "//actors/actor" “id”
...
This action reads the XML file and stores the count of the specified node under the key. The key value can be retrieved using the key name.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
Key_NodeCount | Enter the key name under which you want to store the node count. | Yes | String |
XmlFilePath | Enter the absolute path to the XML file from which you want to get and store the node count. | Yes | String |
Xpath | Enter the path to the node (XPath) from which you want to store the count. | Yes | String |
Example:
XML.StoreNodeCount “Key” “C:\Users\Qualitia\Actors_List.xml” "//actors"
...
This action reads the XML file and verifies whether the specified node exists in the XML document.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
XmlFilePath | Enter the absolute path to the XML file from which you want to get and store the existence of the node. | Yes | String |
Xpath | Enter the path to the node (XPath) whose existence you want to verify. | Yes | String |
Existence | Value for this parameter can be either True or False.
| Yes | String |
Example:
Xml.VerifyIfNodeExists “C:\Users\Qualitia\Actors_List.xml” "//actors/actor" "True"
...
This action reads the XML file and verifies whether the specified attribute exists in the XML document.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
XmlFilePath | Enter the absolute path to the XML file from which you want to get and store the existence of the attribute. | Yes | String |
Xpath | Enter the path to the attribute (XPath) whose existence you want to verify. | Yes | String |
AttributeName | Enter the attribute name whose existence you want to verify. | Yes | String |
Existence | Value for this parameter can be either True or False.
| Yes | String |
Example:
Xml.VerifyIfAttributeExists “C:\Users\Qualitia\Actors_List.xml” "//actors/actor[@id=1]" "True"
...
This action reads the specified XML file and updates the inner value of the specified attribute.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
XmlFilePath | Enter the absolute path to the XML file in which you want to update the value. | Yes | String |
Xpath | Enter the path to the attribute (Xpath) whose value you want to update. | Yes | String |
AttributeName | Enter the attribute name whose value you want to update. | Yes | String |
value | Enter the value which you want to add in the specified attribute. | Yes | String |
Example: Refer to the image above
XML.UpdateAttributeValue “C:\Users\Qualitia\Actors_List.xml” "//actors/actor[@id=1]" "id" “4”
This action will update the attribute value of the specified attribute to the given value (here 4).
XML.StoreEvaluatedXPathResult
...
If the requested Xpath is returning multiple sets of values, Qualitia stores these values under key provided by user. Also, if there is no value to store under the key, Qualitia stores blank space.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
XmlFilePath | Enter the absolute path to the XML file from which you want to store the value. | Yes | String |
Xpath | Enter the path to the attribute (Xpath) whose value you want to store. | Yes | String |
Key | Enter the key name under which you want to store the result of the requested xpath. | Yes | String |
Example:
XML.StoreEvaluatedXPathResult “C:\Users\Qualitia\Actors_List.xml” "//actors/text()" "Key"
...