JSON Test File
Test collection
Parameters
Parameter
Type
Description
processName
String
Name of the process for which you want to run a test
processVersion
Int
Version of the process for which you want to run a test
tests
List of tests to be run
You can define one or several tests in this array.
deleteRequest
Boolean
Indicates whether you want to delete requests that will be launched once the tests have been run
Example
Test
Parameters
Parameter
Type
Description
describe
String
Description of the test
requestParameters
List of parameters that will be transmitted upon launching the request
You can define one or several parameters in this array.
actions
List of actions that will be covered by the test
You can define one or several actions in this array.
assertions
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
name
String
Action ID
operation
Enum
Type of action that will be executed
Possible values: COMPLETE
, CHECK
, SUBPROCESS
, orCANCEL
.
timeout
Int
Maximum time for execution of the action
parameters
List of parameters that will be transmitted upon launching the request
You can define one or several parameters in this array.
subRequestFile
String
Path to the sub request's JSON test file
subRequest
Elements of the sub request
assertions
Checks to perform on the action
exception
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
actions
List of actions that will be covered by the test
You can define one or several actions in this array.
assertions
Checks to be performed on the sub-request created during the test
Example
Parameter
Parameters
Parameter
Type
Description
name
String
Name of the data
numericValue
Float
Numeric value of the data
textValue
String
Text value of the data
dateTimeValue
String
Date/time value of the data
fileValue
File type value of the data
Examples
📌 Example of Test request parameters
📌 Example of Test action parameters
Action assertions
Parameters
Parameter
Type
Description
status
Enum
Expected completion status of the action to be performed
Possible values: OPEN
or CLOSED
substatus
Enum
Expected sub status completion of the action that will be performed
Possible values: COMPLETED
, ABORTED
, RUNNING
, or NOT_RUNNING_NOT_STARTED
data
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
completedActionCount
Int
Expected number of completed actions
status
Enum
Expected completion status of the request created during the test
Possible types: OPEN
or CLOSED
substatus
Enum
Expected completion status of the request created during the test
Possible types: COMPLETED
, ABORTED
, RUNNING
, or NOT_RUNNING_NOT_STARTED
data
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
name
String
Name of the data
numericValue
Float
Numeric value of the data
textValue
Chaîne
Text value of the data
dateTimeValue
Chaîne
Date/time value of the data
Example
File value
Parameters
Parameter
Type
Description
name
String
File name, including its extension
description
String
Description of the file
content
String
Content of the file encoded in base64
contentType
String
File content type
size
Int
File size in MB
Example
Action exception
Parameters
Parameter
Type
Description
type
Enum
Type of exception to send
Possible values: ERROR
or CANCEL
message
String
Error message to send to the action
source
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