diff --git a/scenario-definition/scenario/scenario-1.json b/scenario-definition/scenario/scenario-1.json new file mode 100644 index 000000000..936e1aa0b --- /dev/null +++ b/scenario-definition/scenario/scenario-1.json @@ -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" + } + ] + } + ] +} diff --git a/scenario-definition/transactions/update_catalog_item_price.json b/scenario-definition/transactions/update_catalog_item_price.json new file mode 100644 index 000000000..2f3b6fb02 --- /dev/null +++ b/scenario-definition/transactions/update_catalog_item_price.json @@ -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@@" + } + ] + } + ] + }