Use this information to create a scenario.
The following elements are described:
Request
Aspect |
Value |
Endpoint URL |
/api/behaviour/scenarios |
Content-Type |
application/json |
HTTP Method |
POST |
Body
Field |
Description |
Mandatory |
name |
Name of the scenario |
Yes |
description |
Supplied description of the scenario |
No |
projectId |
Unique identifier for the behavior test project that this assembly configuration belongs
to |
Yes |
stages |
A list of stages, each containing the steps to execute in this scenario |
Yes |
assemblyActors |
A list of assembly configurations to use within the scenario |
Yes |
Each
stages
entry contains the following fields:
Field |
Description |
Mandatory |
name |
Name of the stage |
Yes |
steps |
List of steps to execute in this stage |
Yes |
Each
assemblyActors
entry contains the following fields:
Field |
Description |
Mandatory |
instanceName |
Name to refer to this actor throughout the scenario. If the instance is one to be
instantiated, this name is used as the instance name. |
Yes |
assemblyConfigurationId |
ID of the assembly configuration to instantiate this instance from |
Yes (if provided is false) |
initialState |
State to create the instance in (Installed, Inactive, or Active) |
Yes (if provided is false) |
uninstallOnExit |
Enable/disable the uninstallation of the instance after the scenario completes
successfully |
Yes (if provided is false) |
provided |
Dictates if the actor is an existing instance of an assembly or to be instantiated from an
assembly configuration |
Yes |
Example
{
"name": "test-scale-in",
"projectId": "assembly::Test::1.0",
"description": "description",
"stages": [
{
"name": "Test Stage",
"steps": [
{
"stepDefinitionName": "IntentEngine::CreateAssembly"
"properties": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
}
]
}
],
"assemblyActors": [
{
"assemblyConfigurationId": "7f456ac3-a523-2c1d-2cd1-42dc6124b012",
"initialState": "Active",
"instanceName": "TestInstance",
"provided": false,
"uninstallOnExit": true
}
]
}
Response
Aspect |
Value |
Content-Type |
application/json |
Response Code |
201 (Created) |
Body with id, created At, and lastModifiedAt
Field |
Description |
id |
Unique identifier of the scenario |
name |
Name of the scenario |
description |
Supplied description of the scenario |
projectId |
Unique identifier for the behavior test project where this assembly configuration
belongs |
stages |
A list of stages, each containing the steps to execute in this scenario |
assemblyActors |
A list of assembly configurations to use within the scenario |
createdAt |
Date and time the scenario instance was created |
lastModifiedAt |
Date and time that the scenario was last modified |
Each
stages
entry contains the following fields:
Field |
Description |
name |
Name of the stage |
steps |
List of steps to execute in this stage |
Each
assemblyActors
entry contains the following fields:
Field |
Description |
instanceName |
Name to refer to this actor throughout the scenario. If the instance is one to be
instantiated, this name is used as the instance name. |
assemblyConfigurationId |
ID of the assembly configuration to instantiate this instance from |
initialState |
State to create the instance in (Installed, Inactive, or Active) |
uninstallOnExit |
Enable/disable the uninstallation of the instance after the scenario completes
successfully |
provided |
Dictates if the actor is an existing instance of an assembly or to be instantiated from an
assembly configuration |
Example with id, created At, and lastModifiedAt
{
"id": "8e266bc5-e613-4b0d-9ae0-50db6454b026",
"name": "test-scale-in",
"projectId": "assembly::Test::1.0",
"description": "description",
"createdAt": "2019-03-01T14:41:07.716Z",
"lastModifiedAt": "2019-03-01T14:41:07.716Z",
"stages": [
{
"name": "Test Stage",
"steps": [
{
"stepDefinitionName": "IntentEngine::CreateAssembly"
"properties": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
}
]
}
],
"assemblyActors": [
{
"assemblyConfigurationId": "7f456ac3-a523-2c1d-2cd1-42dc6124b012",
"initialState": "Active",
"instanceName": "TestInstance",
"provided": false,
"uninstallOnExit": true
}
]
}