diff --git a/postman_collections/roost_test_1774441606/ai_modified_boj-openbanking/datasets/api_config-Update_configuration.json b/postman_collections/roost_test_1774441606/ai_modified_boj-openbanking/datasets/api_config-Update_configuration.json new file mode 100644 index 00000000..18d5e6c8 --- /dev/null +++ b/postman_collections/roost_test_1774441606/ai_modified_boj-openbanking/datasets/api_config-Update_configuration.json @@ -0,0 +1,108 @@ +[ + { + "config": { + "setting": "value1" + }, + "statusCode": 200, + "scenario": "Configuration updated successfully" + }, + { + "config": { + "setting": "value2", + "optionalSetting": "optionalValue" + }, + "statusCode": 200, + "scenario": "Configuration updated successfully" + }, + { + "config": {}, + "statusCode": 400, + "scenario": "Bad Request" + }, + { + "config": { + "setting": 123 + }, + "statusCode": 400, + "scenario": "Bad Request" + }, + { + "config": { + "setting": "invalid_enum_value" + }, + "statusCode": 400, + "scenario": "Bad Request" + }, + { + "config": { + "setting": "value3" + }, + "statusCode": 500, + "scenario": "Internal Server Error" + }, + { + "config": { + "setting": "value4" + }, + "statusCode": 200, + "scenario": "Configuration updated successfully" + }, + { + "config": { + "setting": "value5", + "optionalSetting": "optionalValue2" + }, + "statusCode": 200, + "scenario": "Configuration updated successfully" + }, + { + "config": { + "optionalSetting": "optionalValue3" + }, + "statusCode": 400, + "scenario": "Bad Request" + }, + { + "config": { + "setting": true + }, + "statusCode": 400, + "scenario": "Bad Request" + }, + { + "config": { + "setting": "value6" + }, + "statusCode": 500, + "scenario": "Internal Server Error" + }, + { + "config": { + "setting": "value7" + }, + "statusCode": 200, + "scenario": "Configuration updated successfully" + }, + { + "config": { + "setting": "value8", + "optionalSetting": "optionalValue4" + }, + "statusCode": 200, + "scenario": "Configuration updated successfully" + }, + { + "config": { + "setting": null + }, + "statusCode": 400, + "scenario": "Bad Request" + }, + { + "config": { + "setting": "value9" + }, + "statusCode": 500, + "scenario": "Internal Server Error" + } +] \ No newline at end of file diff --git a/postman_collections/roost_test_1774441606/ai_modified_boj-openbanking/roost_postman_ai_modified_boj-openbanking_1774441606.json b/postman_collections/roost_test_1774441606/ai_modified_boj-openbanking/roost_postman_ai_modified_boj-openbanking_1774441606.json new file mode 100644 index 00000000..52724c04 --- /dev/null +++ b/postman_collections/roost_test_1774441606/ai_modified_boj-openbanking/roost_postman_ai_modified_boj-openbanking_1774441606.json @@ -0,0 +1,325 @@ +{ + "item": [ + { + "name": "api/config", + "item": [ + { + "name": "api/config - Retrieve configuration", + "request": { + "name": "Retrieve configuration", + "description": { + "content": "Retrieve the current configuration for RoostGPT.", + "type": "text/plain" + }, + "url": { + "path": [ + "api", + "config" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "auth": null + }, + "response": [ + { + "name": "Configuration retrieved successfully", + "originalRequest": { + "url": { + "path": [ + "api", + "config" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "body": {} + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"config\": {}\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "name": "Bad Request", + "originalRequest": { + "url": { + "path": [ + "api", + "config" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [] + }, + "method": "GET", + "body": {} + }, + "status": "Bad Request", + "code": 400, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + }, + { + "name": "Internal Server Error", + "originalRequest": { + "url": { + "path": [ + "api", + "config" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [] + }, + "method": "GET", + "body": {} + }, + "status": "Internal Server Error", + "code": 500, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + } + ], + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + }, + { + "name": "api/config - Update configuration", + "request": { + "name": "Update configuration", + "description": { + "content": "Update the configuration for RoostGPT.", + "type": "text/plain" + }, + "url": { + "path": [ + "api", + "config" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "POST", + "auth": null, + "body": { + "mode": "raw", + "raw": "{\n \"config\": \"{{config_*object}}\"\n}", + "options": { + "raw": { + "language": "json" + } + } + } + }, + "response": [ + { + "name": "Configuration updated successfully", + "originalRequest": { + "url": { + "path": [ + "api", + "config" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [] + }, + "method": "POST", + "body": { + "mode": "raw", + "raw": "{\n \"config\": \"{{config_*object}}\"\n}", + "options": { + "raw": { + "language": "json" + } + } + } + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + }, + { + "name": "Bad Request", + "originalRequest": { + "url": { + "path": [ + "api", + "config" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [] + }, + "method": "POST", + "body": { + "mode": "raw", + "raw": "{\n \"config\": \"{{config_*object}}\"\n}", + "options": { + "raw": { + "language": "json" + } + } + } + }, + "status": "Bad Request", + "code": 400, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + }, + { + "name": "Internal Server Error", + "originalRequest": { + "url": { + "path": [ + "api", + "config" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [] + }, + "method": "POST", + "body": { + "mode": "raw", + "raw": "{\n \"config\": \"{{config_*object}}\"\n}", + "options": { + "raw": { + "language": "json" + } + } + } + }, + "status": "Internal Server Error", + "code": 500, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + } + ], + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "// ********RoostGPT********\n/*\nTest generated by RoostGPT for test PostmanApiTest using AI Type Open AI and AI Model gpt-4o\n\n\nTest generated for api/config for http method type post in postman framework\n\n*/\n\n// ********RoostGPT********\n\n\nconst ld = require('lodash');\nlet responseData;\nconst contentType = pm.response.headers.get('Content-Type');\nif (contentType === \"application/xml\") {\n var parseString = require('xml2js').parseString;\n parseString(pm.response.body, function(err, result) {\n if (err) {\n console.error('Error parsing XML:', err);\n } else {\n responseData = result;\n }\n });\n} else {\n responseData = pm.response.json();\n}\n// Status code check with early exit\nconst expectedStatusCode = parseInt(pm.variables.get(\"statusCode\"));\nlet statusMatches = true;\nif (pm.variables.get(\"statusCode\")) {\n statusMatches = (pm.response.code === expectedStatusCode);\n pm.test(\"Status code matches expected value\", function() {\n pm.expect(pm.response.code).to.equal(expectedStatusCode);\n });\n}\n\nif (pm.response.code == 200 && statusMatches) {\n pm.test(\"Configuration updated successfully\", function() {\n pm.expect(pm.response.status).to.be.eql(\"OK\");\n });\n\n}\nif (pm.response.code == 400 && statusMatches) {\n pm.test(\"Bad Request\", function() {\n pm.expect(pm.response.status).to.be.eql(\"Bad Request\");\n });\n\n}\nif (pm.response.code == 500 && statusMatches) {\n pm.test(\"Internal Server Error\", function() {\n pm.expect(pm.response.status).to.be.eql(\"Internal Server Error\");\n });\n\n}" + ], + "type": "text/javascript" + } + } + ], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + } + ], + "event": [] + } + ], + "event": [], + "variable": [ + { + "type": "string", + "value": "/", + "key": "baseUrl" + }, + { + "type": "number", + "value": 200, + "key": "statusCode" + } + ], + "info": { + "_postman_id": "c083aa5f-0990-4b22-b464-6d07f61a4e60", + "name": "RoostGPT API", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", + "description": { + "content": "API for managing RoostGPT configurations and integrations.", + "type": "text/plain" + } + } +} \ No newline at end of file