Browse Source

Add scenario file

pull/2059/head
Philipp Theyssen 1 year ago
parent
commit
a334e02149
2 changed files with 84 additions and 0 deletions
  1. +43
    -0
      scenario-definition/scenario/scenario-1.json
  2. +41
    -0
      scenario-definition/transactions/update_catalog_item_price.json

+ 43
- 0
scenario-definition/scenario/scenario-1.json View 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"
}
]
}
]
}

+ 41
- 0
scenario-definition/transactions/update_catalog_item_price.json View File

@ -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…
Cancel
Save