JSON Test File
Test collection
Parameters
Parameter | Type | Description |
| String | Name of the process for which you want to run a test |
| Int | Version of the process for which you want to run a test |
| List of tests to be run You can define one or several tests in this array. | |
| Boolean | Indicates whether you want to delete requests that will be launched once the tests have been run |
Example
Test
Parameters
Parameter | Type | Description |
| String | Description of the test |
| List of parameters that will be transmitted upon launching the request You can define one or several parameters in this array. | |
| List of actions that will be covered by the test You can define one or several actions in this array. | |
| Checks to be performed on the request created during the test |
Example
Action
Test actions will be run in the order that you define.
Parameters
Parameter | Type | Description |
| String | Action ID |
| Enum | Type of action that will be executed Possible values: |
| Int | Maximum time for execution of the action |
| List of parameters that will be transmitted upon launching the request You can define one or several parameters in this array. | |
| String | Path to the sub request's JSON test file |
| Elements of the sub request | |
| Checks to perform on the action | |
| Throw an exception when performing an action |
Example
The content of the sub request file includes only the actions that will be performed.
An example of this content is provided in the Usage example section.
Sub request
Parameters
Parameter | Type | Description |
| List of actions that will be covered by the test You can define one or several actions in this array. | |
| Checks to be performed on the sub-request created during the test |
Example
Parameter
Parameters
Parameter | Type | Description |
| String | Name of the data |
| Float | Numeric value of the data |
| String | Text value of the data |
| String | Date/time value of the data |
| File type value of the data |
Examples
📌 Example of Test request parameters
📌 Example of Test action parameters
Action assertions
Parameters
Parameter | Type | Description |
| Enum | Expected completion status of the action to be performed Possible values: |
| Enum | Expected sub status completion of the action that will be performed Possible values: |
| List of data to check for the tested action |
The assertions
node checks whether the data returned by the action is exactly the same as that specified in its parameters. If they don't match, the test will be evaluated as having failed.
Example
Request assertions
Parameters
Parameter | Type | Description |
| Int | Expected number of completed actions |
| Enum | Expected completion status of the request created during the test Possible types: |
| Enum | Expected completion status of the request created during the test Possible types: |
| List of data to check for the request created during the test |
The assertions
node checks whether the data returned by the request created during the test is exactly the same as that specified in its parameters. If they don't match, the test will be evaluated as having failed.
Example
Data
Parameters
Parameter | Type | Description |
| String | Name of the data |
| Float | Numeric value of the data |
| Chaîne | Text value of the data |
| Chaîne | Date/time value of the data |
Example
File value
Parameters
Parameter | Type | Description |
| String | File name, including its extension |
| String | Description of the file |
| String | Content of the file encoded in base64 |
| String | File content type |
| Int | File size in MB |
Example
Action exception
Parameters
Parameter | Type | Description |
| Enum | Type of exception to send Possible values: |
| String | Error message to send to the action |
| String | Source of the exception to send to the action |
Example
Usage example
The process test
command is based on a json
file. This definition document allows you to define the flows that will be executed for your tests and the expected results. It consists of 10 different aspects.
Here's the workflow that we'll use for the explanations:
Test file
This is the content of the parent process test file:
subRequestFile
This is the content of the subprocessjson.json
test file, used in the first test for the SUBTEST_PROCESS
action:
Last updated