From a0f5e7950963d11163916354338033916c2ad934 Mon Sep 17 00:00:00 2001 From: Anna Chernyshova Date: Wed, 1 May 2024 15:49:26 -0400 Subject: [PATCH] added postman collection for application api testing and demo --- TC for Java.postman_collection.json | 99 +++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 TC for Java.postman_collection.json diff --git a/TC for Java.postman_collection.json b/TC for Java.postman_collection.json new file mode 100644 index 0000000..c48f52a --- /dev/null +++ b/TC for Java.postman_collection.json @@ -0,0 +1,99 @@ +{ + "info": { + "_postman_id": "9470b311-46f1-47b7-aa30-1bec07890777", + "name": "TC for Java", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" + }, + "item": [ + { + "name": "Create a product", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\"code\": \"P201\",\n\"name\": \"Product P201\",\n\"description\": \"Product P201 description\",\n\"price\": 24.0\n}", + "options": { + "raw": {} + } + }, + "url": { + "raw": "http://localhost:8080/api/products", + "protocol": "http", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "api", + "products" + ] + } + }, + "response": [] + }, + { + "name": "Upload Product Image", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "file", + "type": "file", + "src": "/Users/user/image.png" + } + ], + "options": { + "formdata": {} + } + }, + "url": { + "raw": "http://localhost:8080/api/products/P101/image", + "protocol": "http", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "api", + "products", + "P101", + "image" + ] + } + }, + "response": [] + }, + { + "name": "Get a product by code", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "http://localhost:8080/api/products/P201", + "protocol": "http", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "api", + "products", + "P201" + ] + } + }, + "response": [] + } + ], + "protocolProfileBehavior": {} +} \ No newline at end of file