Add scenario file
This commit is contained in:
parent
a283d4be46
commit
a334e02149
43
scenario-definition/scenario/scenario-1.json
Normal file
43
scenario-definition/scenario/scenario-1.json
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
"scenario":
|
||||||
|
{
|
||||||
|
"id": "scenario-id",
|
||||||
|
"variables": [
|
||||||
|
{
|
||||||
|
"id": "userIds",
|
||||||
|
"type": "guid",
|
||||||
|
"count": 10000
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "productIds",
|
||||||
|
"type": "unsignedInt",
|
||||||
|
"count": 1000
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"transactions": [
|
||||||
|
{
|
||||||
|
"id": "add-items-to-basket",
|
||||||
|
"arguments":[
|
||||||
|
{
|
||||||
|
"name": "userId",
|
||||||
|
"value": "userIds",
|
||||||
|
"distribution": "zipfian"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "update-catalog-item-price",
|
||||||
|
"arguments":[
|
||||||
|
{
|
||||||
|
"name": "userId",
|
||||||
|
"value": "userIds",
|
||||||
|
"distribution": "uniform"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "productId",
|
||||||
|
"value": "productIds",
|
||||||
|
"distribution": "zipfian"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,41 @@
|
|||||||
|
"transaction":
|
||||||
|
{
|
||||||
|
"id": "update-catalog-item-price",
|
||||||
|
"dynamicVariables": [
|
||||||
|
{
|
||||||
|
"name": "new-price",
|
||||||
|
"type": "unsignedInt"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"operations": [
|
||||||
|
{
|
||||||
|
"operationRefId": "catalog-get-items",
|
||||||
|
"id": "op-1",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"operationRefId": "catalog-update-price",
|
||||||
|
"id": "op-2",
|
||||||
|
"providedValues": [
|
||||||
|
{
|
||||||
|
"key": "item-1",
|
||||||
|
"value":
|
||||||
|
{
|
||||||
|
"id": "@@op-1.response.data[0].id@@"
|
||||||
|
"name": "@@op-1.response.data[0].name@@"
|
||||||
|
"description": "@@op-1.response.data[0].description@@"
|
||||||
|
"price": "{{new-price}}"
|
||||||
|
"pictureFileName": "@@op-1.response.data[0].pictureFileName@@"
|
||||||
|
"pictureUri": "@@op-1.response.data[0].pictureUri@@"
|
||||||
|
"catalogTypeId": "@@op-1.response.data[0].catalogTypeId@@"
|
||||||
|
"catalogType": "@@op-1.response.data[0].catalogType@@"
|
||||||
|
"catalogBrandId": "@@op-1.response.data[0].catalogBrandId@@"
|
||||||
|
"catalogBrand": "@@op-1.response.data[0].catalogBrand@@"
|
||||||
|
"availableStock": "@@op-1.response.data[0].availableStock@@"
|
||||||
|
"restockThreshold": "@@op-1.response.data[0].restockThreshold@@"
|
||||||
|
"maxStockThreshold": "@@op-1.response.data[0].maxStockThreshold@@"
|
||||||
|
"onReorder": "@@op-1.response.data[0].onReorder@@"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user