expectedStatus - If this parameter is set, the action will check if the actual status code equals expected status code.
If the actual status code is not the expected status code then action fail.
Accepted values are numbers between 100 and 599 (1xx - 5xx).
HeaderDelimiter - This parameter is used to decide the character to delimit the headers around, by default '=' will be used.
jsonPath - This parameter is used to extract nodes or value from server's JSON response (if such is available).
Supported syntax is the Jayway JsonPath syntax.
You can find a complete documentation for Jayway JsonPath at GitHub
For a specific example, see Example 1.2
If the value specified is not found or the the response is a non-JSON response, action will fail.
ignoreUntrustedCertificate - This parameter is used to disable the verification of SSL certificate.
Parameter is false by default. If set to true, RESTful client will accept self signed and untrusted SSL certificate presented by the server when sending a request.
schemaValidationOutputFilePath - This parameter is the file path for the result of the JSON schema validation.
If empty, it will create the output file in the system's Downloads directory.
schemaPath - This parameter is the path for the JSON Schema file.
This parameter is for a full* path of a local schema file, or a URL pointing to a remote schema file. If a URL is provided, it will download the schema locally to a temporary file, before performing the validation. Schema validation is performed on the JSON response object provided in the JsonResponse field.
createFile - This parameter is a boolean flag to indicate that a validation results output is required.
If set totrue, and the schemaValidationOutput parameter is set, a file holding the validation result will be created in the provided location.
filePath - This parameter is the full path of a local file which should be sent to the designated endpoint using POST, PUT, or PATCH. if this parameter is set, the file will be sent as multipart/form-data format, you can still supply a separate body and body format to the request.
response - The full response from the server or the extracted node/value found using expression specified in jsonPath parameter.
If jsonPath is set, response will be limited to the node/value found using the provided expression.
If the value specified is not found or the the response or the response is not a valid JSON, this field will be empty.
jsonResponse - The full response from the server or the extracted node/value found using expression specified in jsonPath parameter as a JSON object.
This parameter holds the whole response body, or the node/property requested via jsonPath as a JSON object.
status - Server's response status that is a number between 100 and 599 (1xx - 5xx).
schemaValidationOutput - This parameter is the output parameter for the schema validation.
This parameter will contain the output of any violations in the JSON file according to the provided schema.
By using parameters in your rest API calls, you will be able to pass information between test steps like bearer tokens, API keys and server responses and create data driven tests (utilizing CSV files).
Parameters on rest API tests are avilbale on any input fields.
To create/select a parameter, simply select the input field and click on Select parameter:
From the Parameters menu, you can create a new parameter or select existing ones to use in your steps.
Project parameters are shared across all your tests, and test variables are set per test
You will easily be able to chain requests and transfer data from one request to another, like shown in Examples 13-15, by saving the response of the POST request, we receive the URL to use in the next PUT request.
All actions have several criterias that may result in failure assertion:
When expectedStatus does not match the actual response status:
Note: If the expectedStatus is not set, and the server responds with status other than 1xx, this will not be considered a failure.
When the requested node/value by jsonPath is not found in the response.
When the server fails to respond.
All actions will report a message with the following information, no matter if the action pass or fail:
Server response status (taken from the status field)
Response body or “No body/value was returned by the server” when it's absent.
Report of violations discovered using provided JSON schema, or a statement that none were found.
Following TestProject platform conventions, unset parameters will be treated as nulls / empty strings and won't be used.
If the format field is empty it will take application/json as the default value.