Create Scenario Result
/runtime/scenarioresult
Request
There are no request parameters for this operation.
Back to TopResponse
201 Response
Examples
The following example shows how to create a scenario result by submitting a POST request on the REST resource using cURL. For more information about cURL, see "Use cURL".
The -d option specifies the file to attach as the request body.
curl -X POST "hostname:port/runtime/scenarioresult" -H "accept: */*" -H "Content-Type: application/json" -d @file.json
where:
- file.json is the JSON file the execution details to create.
Example of Request Body
The following is an example of the contents of file.json sent as the request body:
{
"id": "1",
"name": "Create Basic Subscription",
"description": "Creates a new Basic Subscription",
"tags": null,
"namespace": null,
"type": "TestScenario",
"status": "PASSED",
"startTime": 1732603368316,
"endTime": 1732603376192,
"duration": 7876,
"error": null,
"stackTrace": null,
"failure": null,
"totalCount": 1,
"passCount": 1,
"failCount": 0,
"skipCount": 0,
"errorCount": 0,
"resultNamespace": null,
"testCaseResults": [
{
"id": "45",
"name": "Create basic subscription",
"description": null,
"tags": null,
"namespace": null,
"type": "TestCase",
"status": "PASSED",
"startTime": 1732603368470,
"endTime": 1732603376048,
"duration": 7578,
"error": null,
"stackTrace": null,
"failure": null,
"totalCount": 3,
"passCount": 3,
"failCount": 0,
"skipCount": 0,
"errorCount": 0,
"resultNamespace": null,
"testStepResults": [
{
"id": "183",
"name": "When set variable,",
"description": null,
"tags": null,
"namespace": null,
"type": "TestStep",
"status": "PASSED",
"startTime": 1732603368625,
"endTime": 1732603368642,
"duration": 17,
"error": null,
"stackTrace": null,
"failure": null,
"totalCount": 0,
"passCount": 0,
"failCount": 0,
"skipCount": 0,
"errorCount": 0,
"resultNamespace": null,
"resultFiles": {},
"actionName": "set variable",
"validations": null,
"dataVariables": null,
"saveVariables": [
{
"variable": "region",
"value": "Bengaluru",
"runtimeValue": "Bengaluru"
},
{
"variable": "category",
"value": "basic",
"runtimeValue": "basic"
},
{
"variable": "offer",
"value": "basicOffer",
"runtimeValue": "basicOffer"
},
{
"variable": "paymentType",
"value": "CREDITCARD",
"runtimeValue": "CREDITCARD"
}
],
"actionType": "REST",
"stepLogs": [
{
"level": "INFO",
"timestamp": 1732603368471,
"message": "\n------------------------------------------------------------",
"error": ""
},
{
"level": "INFO",
"timestamp": 1732603368472,
"message": "STEP STARTED : When set variable,",
"error": ""
},
{
"level": "INFO",
"timestamp": 1732603368472,
"message": "------------------------------------------------------------",
"error": ""
},
{
"level": "INFO",
"timestamp": 1732603368629,
"message": "Get REST plugin from plugin manager",
"error": ""
},
{
"level": "INFO",
"timestamp": 1732603368634,
"message": "Initializinig the REST plugin",
"error": ""
},
{
"level": "INFO",
"timestamp": 1732603368634,
"message": "com.oracle.cagbu.taas.plugin.rest.RestActionPlugin@1ec898c4",
"error": ""
},
{
"level": "INFO",
"timestamp": 1732603368634,
"message": "Running the REST plugin with step ",
"error": ""
},
{
"level": "INFO",
"timestamp": 1732603368635,
"message": "Process set variable task : 4",
"error": ""
},
{
"level": "INFO",
"timestamp": 1732603368639,
"message": "Test Context : Updating key region : Bengaluru = Bengaluru",
"error": ""
},
{
"level": "INFO",
"timestamp": 1732603368640,
"message": "Test Context : Updating key category : basic = basic",
"error": ""
},
{
"level": "INFO",
"timestamp": 1732603368641,
"message": "Test Context : Updating key offer : basicOffer = basicOffer",
"error": ""
},
{
"level": "INFO",
"timestamp": 1732603368642,
"message": "Test Context : Updating key paymentType : CREDITCARD = CREDITCARD",
"error": ""
}
]
},
{
"id": "184",
"name": "When create a new VT subscription",
"description": null,
"tags": null,
"namespace": null,
"type": "TestStep",
"status": "PASSED",
"startTime": 1732603370701,
"endTime": 1732603371324,
"duration": 623,
"error": null,
"stackTrace": null,
"failure": null,
"totalCount": 0,
"passCount": 0,
"failCount": 0,
"skipCount": 0,
"errorCount": 0,
"resultNamespace": null,
"resultFiles": {
"request": "{\"type\":\"BASIC\",\"name\":\"vt-user-basic-TBcBFFdOhEUGg\",\"region\":\"default region\",\"category\":\"default category\",\"offer\":\"default offer\",\"paymentType\":\"default payment type\"}",
"response": "{\"type\":\"BASIC\",\"name\":\"vt-user-basic-TBcBFFdOhEUGg\",\"region\":\"default region\",\"category\":\"default category\",\"offer\":\"default offer\",\"paymentType\":\"default payment type\"}",
"connection": {
"name": "virtualtenant",
"description": "virtualtenant_connection",
"type": "REST",
"url": "https://jpprasad-dev.snbomprshared1.gbucdsint02bom.oraclevcn.com:6502",
"authorize": true,
"authorization": {
"type": "OAUTH2",
"oauthConfig": {
"grantType": "client_credentials",
"tokenUrl": "https://idcs-e64ec1bbecdf4cce90b5a17df60402ab.identity.oraclecloud.com/oauth2/v1/token",
"clientId": "7761b1041ec64511983844512b46a213",
"clientSecret": "c030860c-3a21-44c5-a0b7-8e5e868e3990",
"scope": "https://jpprasad-dev.snbomprshared1.gbucdsint02bom.oraclevcn.com:443/taas ",
"username": null,
"password": null,
"lastUpdated": 1732603370698,
"accessToken": "eyJ4NXQjUzI1NiI6IlU0eUxXNVNYbi13UHVLZW9vWFNxd2xubHJGVjR4R2xNdy1pbzJlc0ZGc0EiLCJ4NXQiOiJjUmxNSm1rd3hWbGloLUc4TkVpMUVGMlpiTjgiLCJraWQiOiJTSUdOSU5HX0tFWSIsImFsZyI6IlJTMjU2In0.eyJjbGllbnRfb2NpZCI6Im9jaWQxLmRvbWFpbmFwcC5vYzEucGh4LmFtYWFhYWFhNHhvb2U2eWF3amZraGluc3g0b2hkbHlnMmloeW5kc3lvdG90Znh6eGhncXh1cDMzNTZ0cSIsInN1YiI6Ijc3NjFiMTA0MWVjNjQ1MTE5ODM4NDQ1MTJiNDZhMjEzIiwic2lkbGUiOjQ4MCwidXNlci50ZW5hbnQubmFtZSI6ImlkY3MtZTY0ZWMxYmJlY2RmNGNjZTkwYjVhMTdkZjYwNDAyYWIiLCJpc3MiOiJodHRwczpcL1wvaWRlbnRpdHkub3JhY2xlY2xvdWQuY29tXC8iLCJkb21haW5faG9tZSI6InVzLXBob2VuaXgtMSIsImNhX29jaWQiOiJvY2lkMS50ZW5hbmN5Lm9jMS4uYWFhYWFhYWFweWU1dXNpMmdkaXd4aG9xamFteWVxNzVraXF5c3RxczQ1bmx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Y0ZWMxYmJlY2RmNGNjZTkwYjVhMTdkZjYwNDAyYWIuaWRlbnRpdHkub3JhY2xlY2xvdWQuY29tOjQ0MyIsInJlc291cmNlX2FwcF9pZCI6ImYwNGM2MmNkNjQyYjQ3MjhiNzBhMzdjNTg4Mjg1MDVkIn0.ajtEb4OZo-7gQWtbrNtA9OZvOWwuuvmwzOm4vAVjAdPqOvk_eKn1G3OtUMt2JLKv1gthhjj7BLVoRURtedZS87XzBtk3T1niAgjgYQoLLtNTKtX0_SGqmEi9_oRX-t4xl1CSgbnKPP3t-QEzDSvo66OCw_q8xx-D6x8q47V44IvjV_PRWk0XIVTuxohNIp1mb3OCXkivKImNLXQcg7aw00IiIE63UunygrL_dUoPlLPG5foErDEukgf4FmZbI0OaGHvrTAQkbwMp50m3Vz1JYlUvGTq_W6u-lwpRCQfqq1jeYXSmhHssVX5y8QQyt1RavYZKABP6iQ9aFrzRAN4q_Q"
}
},
"hostname": "https://jpprasad-dev.snbomprshared1.gbucdsint02bom.oraclevcn.com",
"product": "virtualtenant",
"topologyType": "DEFAULT",
"connectionURI": []
}
},
"actionName": "Create new subscription",
"validations": [
{
"property": "$status",
"propertyValue": "201",
"value": "201",
"runtimeValue": "SUCCESS",
"result": true
}
],
"dataVariables": [
{
"property": "type",
"value": "BASIC",
"runtimeValue": "BASIC"
},
{
"property": "name",
"value": "vt-user-basic-npVWewiJfkMbLCp",
"runtimeValue": "vt-user-basic-TBcBFFdOhEUGg"
}
],
"saveVariables": null,
"actionType": "REST",
"stepLogs": [
{
"level": "INFO",
"timestamp": 1732603368814,
"message": "\n------------------------------------------------------------",
"error": ""
},
{
"level": "INFO",
"timestamp": 1732603368814,
"message": "STEP STARTED : When create a new VT subscription",
"error": ""
},
{
"level": "INFO",
"timestamp": 1732603368814,
"message": "------------------------------------------------------------",
"error": ""
},
{
"level": "INFO",
"timestamp": 1732603368967,
"message": "Get REST plugin from plugin manager",
"error": ""
},
{
"level": "INFO",
"timestamp": 1732603368968,
"message": "Initializinig the REST plugin",
"error": ""
},
{
"level": "INFO",
"timestamp": 1732603368968,
"message": "com.oracle.cagbu.taas.plugin.rest.RestActionPlugin@3341bca3",
"error": ""
},
{
"level": "INFO",
"timestamp": 1732603368968,
"message": "Running the REST plugin with step ",
"error": ""
},
{
"level": "INFO",
"timestamp": 1732603368968,
"message": "Get Connection for virtualtenant.REST",
"error": ""
},
{
"level": "INFO",
"timestamp": 1732603368969,
"message": "Get Environment : virtualtenant env : com.oracle.cagbu.taas.model.connection.APIConnection@17b120d0",
"error": ""
},
{
"level": "INFO",
"timestamp": 1732603368969,
"message": "url : virtualtenant :: https://jpprasad-dev.snbomprshared1.gbucdsint02bom.oraclevcn.com:6502",
"error": ""
},
{
"level": "INFO",
"timestamp": 1732603368970,
"message": "name = Create new subscription\nbdd = create a new VT subscription\nproduct = virtualtenant\ndescription = Create a new VT subscription\nType = REST\ntags = [VIRTUALTENANT, SUBSCRIPTION]\nresource = mock\nrequest = subscription.request.json\nrequestType = FILE\nrequest string = { \"type\" : \"DEFAULT\", \"name\" : \"subscriber name\", \"region\" : \"default region\", \"category\":\"default category\", \"offer\":\"default offer\", \"paymentType\":\"default payment type\" }\nmethod = POST\nqueryParams = null\nexpectedStatusCode = 201\npath = virtualtenant/subscription\n\n",
"error": ""
},
{
"level": "INFO",
"timestamp": 1732603368971,
"message": "URL: https://jpprasad-dev.snbomprshared1.gbucdsint02bom.oraclevcn.com:6502/mock",
"error": ""
},
{
"level": "INFO",
"timestamp": 1732603368974,
"message": "URL : https://jpprasad-dev.snbomprshared1.gbucdsint02bom.oraclevcn.com:6502/mock",
"error": ""
},
{
"level": "INFO",
"timestamp": 1732603368974,
"message": "Request : null",
"error": ""
},
{
"level": "INFO",
"timestamp": 1732603368974,
"message": "Method : POST",
"error": ""
},
{
"level": "INFO",
"timestamp": 1732603368974,
"message": "Action : Create new subscription",
"error": ""
},
{
"level": "DEBUG",
"timestamp": 1732603368975,
"message": "Processing Request",
"error": ""
},
{
"level": "DEBUG",
"timestamp": 1732603368975,
"message": "Processing Parameters",
"error": ""
},
{
"level": "INFO",
"timestamp": 1732603369021,
"message": "Request String : {\"type\":\"BASIC\",\"name\":\"vt-user-basic-TBcBFFdOhEUGg\",\"region\":\"default region\",\"category\":\"default category\",\"offer\":\"default offer\",\"paymentType\":\"default payment type\"}",
"error": ""
},
{
"level": "INFO",
"timestamp": 1732603371318,
"message": "Status : 201",
"error": ""
},
{
"level": "INFO",
"timestamp": 1732603371322,
"message": "Response :{\"type\":\"BASIC\",\"name\":\"vt-user-basic-TBcBFFdOhEUGg\",\"region\":\"default region\",\"category\":\"default category\",\"offer\":\"default offer\",\"paymentType\":\"default payment type\"}",
"error": ""
},
{
"level": "INFO",
"timestamp": 1732603371323,
"message": "Validating if execution is successful using expected status code mentioned in action.json",
"error": ""
},
{
"level": "INFO",
"timestamp": 1732603371323,
"message": "Validation is successful : Expected exitcode: 201, Actual : 201",
"error": ""
}
]
},
{
"id": "185",
"name": "When create subscription event,",
"description": null,
"tags": null,
"namespace": null,
"type": "TestStep",
"status": "PASSED",
"startTime": 1732603371745,
"endTime": 1732603375813,
"duration": 4068,
"error": null,
"stackTrace": null,
"failure": null,
"totalCount": 0,
"passCount": 0,
"failCount": 0,
"skipCount": 0,
"errorCount": 0,
"resultNamespace": null,
"resultFiles": {},
"actionName": "Create subscription event",
"validations": null,
"dataVariables": [
{
"property": "minDuration",
"value": "1000",
"runtimeValue": null
},
{
"property": "maxDuration",
"value": "5000",
"runtimeValue": null
},
{
"property": "status",
"value": "PASS",
"runtimeValue": null
}
],
"saveVariables": null,
"actionType": "SIMULATION",
"stepLogs": [
{
"level": "INFO",
"timestamp": 1732603371588,
"message": "\n------------------------------------------------------------",
"error": ""
},
{
"level": "INFO",
"timestamp": 1732603371589,
"message": "STEP STARTED : When create subscription event,",
"error": ""
},
{
"level": "INFO",
"timestamp": 1732603371589,
"message": "------------------------------------------------------------",
"error": ""
},
{
"level": "INFO",
"timestamp": 1732603371745,
"message": "Get SIMULATION plugin from plugin manager",
"error": ""
},
{
"level": "INFO",
"timestamp": 1732603371748,
"message": "Initializinig the SIMULATION plugin",
"error": ""
},
{
"level": "INFO",
"timestamp": 1732603371748,
"message": "com.oracle.cagbu.taas.plugin.stepsimulation.StepSimulationActionPlugin@5d96ddec",
"error": ""
},
{
"level": "INFO",
"timestamp": 1732603371749,
"message": "Running the SIMULATION plugin with step ",
"error": ""
},
{
"level": "INFO",
"timestamp": 1732603371749,
"message": "Running simulation action plugin",
"error": ""
},
{
"level": "INFO",
"timestamp": 1732603371749,
"message": "Event:create subscription event",
"error": ""
},
{
"level": "INFO",
"timestamp": 1732603371750,
"message": "Event configuration is not found in Simulation configurations",
"error": ""
},
{
"level": "INFO",
"timestamp": 1732603371751,
"message": "Minimum duration:1000 ms",
"error": ""
},
{
"level": "INFO",
"timestamp": 1732603371751,
"message": "Maximum duration:5000 ms",
"error": ""
},
{
"level": "INFO",
"timestamp": 1732603371751,
"message": "Waiting for duration:4056 ms",
"error": ""
}
]
}
]
}
],
"resultFiles": {
"map": {
"design bdd": "Create_Basic_Subscription.design.scenario",
"runtime bdd": "Create_Basic_Subscription.runtime.scenario"
},
"json": "{\"design bdd\": \"Create_Basic_Subscription.design.scenario\",\"runtime bdd\": \"Create_Basic_Subscription.runtime.scenario\"}"
},
"execution_id": 286
}
Example of Response Body
If successful, the response code 201 is returned along with a header. For example:
{
"_id": 136
}
If the request fails, the response includes the appropriate HTTP code. For a 4xx/5xx code, the message body also contains a ProblemDetails structure with the cause attribute set to the appropriate application error.