Commit 3dc85443 by Lee Daehyun

test作成

parent 78493292
...@@ -434,7 +434,7 @@ ...@@ -434,7 +434,7 @@
}, },
"status": "OK", "status": "OK",
"code": 200, "code": 200,
"_postman_previewlanguage": "plain", "_postman_previewlanguage": "json",
"header": [ "header": [
{ {
"key": "Server", "key": "Server",
...@@ -470,7 +470,7 @@ ...@@ -470,7 +470,7 @@
} }
], ],
"cookie": [], "cookie": [],
"body": "{\"httpStatus\":200,\"presentTime\":\"2021-02-25 11:40:50\",\"presentTimeUTC\":\"2021-02-25T02:40:50Z\",\"body\":{\"shopMemberId\":950,\"memberName\":\"API_test_f\",\"profileImagePath\":\"\",\"groupIdList\":[1415,1416,1417,1418,1419]}}" "body": "{\n \"httpStatus\": 200,\n \"presentTime\": \"2021-02-25 11:40:50\",\n \"presentTimeUTC\": \"2021-02-25T02:40:50Z\",\n \"body\": {\n \"shopMemberId\": 950,\n \"memberName\": \"API_test_f\",\n \"profileImagePath\": \"\",\n \"groupIdList\": [\n 1415,\n 1416,\n 1417,\n 1418,\n 1419\n ]\n }\n}"
} }
] ]
}, },
...@@ -680,7 +680,7 @@ ...@@ -680,7 +680,7 @@
}, },
"status": "OK", "status": "OK",
"code": 200, "code": 200,
"_postman_previewlanguage": "plain", "_postman_previewlanguage": "json",
"header": [ "header": [
{ {
"key": "Server", "key": "Server",
...@@ -716,7 +716,7 @@ ...@@ -716,7 +716,7 @@
} }
], ],
"cookie": [], "cookie": [],
"body": "{\"httpStatus\":200,\"presentTime\":\"2021-02-25 11:40:56\",\"presentTimeUTC\":\"2021-02-25T02:40:56Z\",\"body\":{\"groupIds\":[1415,1416,1417,1418,1419]}}" "body": "{\n \"httpStatus\": 200,\n \"presentTime\": \"2021-02-25 11:40:56\",\n \"presentTimeUTC\": \"2021-02-25T02:40:56Z\",\n \"body\": {\n \"groupIds\": [\n 1415,\n 1416,\n 1417,\n 1418,\n 1419\n ]\n }\n}"
} }
] ]
} }
...@@ -738,7 +738,7 @@ ...@@ -738,7 +738,7 @@
"\r", "\r",
"var jsonData = pm.response.json().errorMessage;\r", "var jsonData = pm.response.json().errorMessage;\r",
"\r", "\r",
"pm.test(\"nameCardMemberIdを文字にした時のエラーメッセージ確認\", function() {\r", "pm.test(\"nameCardMemberIdを文字にした時のエラー確認\", function() {\r",
" pm.expect(jsonData[0]).eq(\"nameCardMemberIdは整数(最大2147483647)でなければいけません。\");\r", " pm.expect(jsonData[0]).eq(\"nameCardMemberIdは整数(最大2147483647)でなければいけません。\");\r",
"});" "});"
], ],
...@@ -875,7 +875,7 @@ ...@@ -875,7 +875,7 @@
"name": "[エラー]nameCardMemberIdを未入力した場合", "name": "[エラー]nameCardMemberIdを未入力した場合",
"item": [ "item": [
{ {
"name": "nameCardMemberIdを未入力した場合", "name": "nameCardMemberIdを未入力場合",
"event": [ "event": [
{ {
"listen": "test", "listen": "test",
...@@ -887,7 +887,7 @@ ...@@ -887,7 +887,7 @@
"\r", "\r",
"var errorMessage = pm.response.json().errorMessage;\r", "var errorMessage = pm.response.json().errorMessage;\r",
"\r", "\r",
"pm.test(\"nameCardMemberIdを未入力のエラーメッセージ確認\", function() {\r", "pm.test(\"nameCardMemberIdを未入力のエラー確認\", function() {\r",
" pm.expect(errorMessage).eq(\"BAD_REQUEST\");\r", " pm.expect(errorMessage).eq(\"BAD_REQUEST\");\r",
"});" "});"
], ],
...@@ -1013,6 +1013,66 @@ ...@@ -1013,6 +1013,66 @@
] ]
} }
] ]
},
{
"name": "[エラー]nameCardMemberIdが空欄の場合",
"item": [
{
"name": "nameCardMemberIdが空欄の場合",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 400\", function () {\r",
" pm.response.to.have.status(400);\r",
"});\r",
"\r",
"pm.test(\"nameCardMemberIdが空欄の場合確認\", function() {\r",
" var errorMessage = pm.response.json().errorMessage;\r",
" pm.expect(errorMessage).eq(\"BAD_REQUEST\");\r",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "https://chatdev2.abook.bz/acms/fermi/chatapi/user?sid={{sid}}&cmd=11&nameCardMemberId=",
"protocol": "https",
"host": [
"chatdev2",
"abook",
"bz"
],
"path": [
"acms",
"fermi",
"chatapi",
"user"
],
"query": [
{
"key": "sid",
"value": "{{sid}}"
},
{
"key": "cmd",
"value": "11"
},
{
"key": "nameCardMemberId",
"value": ""
}
]
}
},
"response": []
}
]
} }
] ]
}, },
...@@ -3482,6 +3542,89 @@ ...@@ -3482,6 +3542,89 @@
"method": "POST", "method": "POST",
"header": [], "header": [],
"url": { "url": {
"raw": "https://chatdev2.abook.bz/acms/fermi/chatapi/room?sid={{sid}}&cmd=2&roomType=2&inviteMemberIds=946,947&newRoomName=createNewRoomTest",
"protocol": "https",
"host": [
"chatdev2",
"abook",
"bz"
],
"path": [
"acms",
"fermi",
"chatapi",
"room"
],
"query": [
{
"key": "sid",
"value": "{{sid}}"
},
{
"key": "cmd",
"value": "2"
},
{
"key": "roomType",
"value": "2"
},
{
"key": "inviteMemberIds",
"value": "946,947"
},
{
"key": "newRoomName",
"value": "createNewRoomTest"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Server",
"value": "nginx/1.12.2"
},
{
"key": "Date",
"value": "Fri, 26 Feb 2021 04:24:53 GMT"
},
{
"key": "Content-Type",
"value": "text/plain;charset=UTF-8"
},
{
"key": "Content-Length",
"value": "129"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Cache-Control",
"value": "no-store, no-cache"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "-1"
}
],
"cookie": [],
"body": "{\n \"httpStatus\": 200,\n \"presentTime\": \"2021-02-26 13:24:53\",\n \"presentTimeUTC\": \"2021-02-26T04:24:53Z\",\n \"body\": {\n \"roomId\": 264,\n \"roomType\": 2\n }\n}"
},
{
"name": "createNewRoom",
"originalRequest": {
"method": "POST",
"header": [],
"url": {
"raw": "https://chatdev2.abook.bz/acms/fermi/chatapi/room?sid={{sid}}&cmd=2&roomType=2&inviteMemberIds=946&newRoomName=createNewRoomTest", "raw": "https://chatdev2.abook.bz/acms/fermi/chatapi/room?sid={{sid}}&cmd=2&roomType=2&inviteMemberIds=946&newRoomName=createNewRoomTest",
"protocol": "https", "protocol": "https",
"host": [ "host": [
...@@ -4394,11 +4537,98 @@ ...@@ -4394,11 +4537,98 @@
}, },
{ {
"name": "exitRoom", "name": "exitRoom",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function () {\r",
" pm.response.to.have.status(200);\r",
"});\r",
"\r",
"pm.test(\"脱出の確認\", function() {\r",
" var roomId = pm.globals.get(\"roomId\");\r",
" var chatRoomInfoList= pm.response.json().body.chatRoomInfoList\r",
"\r",
" let map = new Map();\r",
" for (var i = 0; i < chatRoomInfoList.length; i++) {\r",
" map.set(chatRoomInfoList[i].roomId, chatRoomInfoList[i].roomId)\r",
" }\r",
"\r",
" var exitRoomId = map.get(roomId);\r",
" pm.expect(exitRoomId).eq(undefined);\r",
"})"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "PUT",
"header": [],
"url": {
"raw": "https://chatdev2.abook.bz/acms/fermi/chatapi/room?sid={{sid}}&cmd=3&roomId={{roomId}}",
"protocol": "https",
"host": [
"chatdev2",
"abook",
"bz"
],
"path": [
"acms",
"fermi",
"chatapi",
"room"
],
"query": [
{
"key": "sid",
"value": "{{sid}}"
},
{
"key": "cmd",
"value": "3"
},
{
"key": "roomId",
"value": "{{roomId}}"
}
]
}
},
"response": []
}
]
},
{
"name": "[エラー]チャットルームIDが存在しない場合",
"item": [
{
"name": "DBにroomIdが存在しない場合",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 500\", function () {\r",
" pm.response.to.have.status(500);\r",
"});\r",
"\r",
"pm.test(\"DBに存在しないroomIdをした時のエラー確認\", function() {\r",
" var errorMessage = pm.response.json().errorMessage;\r",
"\r",
" pm.expect(errorMessage).eq(\"SYSTEM_ERROR\");\r",
"})"
],
"type": "text/javascript"
}
}
],
"request": { "request": {
"method": "PUT", "method": "PUT",
"header": [], "header": [],
"url": { "url": {
"raw": "https://chatdev2.abook.bz/acms/fermi/chatapi/room?sid={{sid}}&cmd=3&roomId=270", "raw": "https://chatdev2.abook.bz/acms/fermi/chatapi/room?sid={{sid}}&cmd=3&roomId=99999",
"protocol": "https", "protocol": "https",
"host": [ "host": [
"chatdev2", "chatdev2",
...@@ -4422,7 +4652,7 @@ ...@@ -4422,7 +4652,7 @@
}, },
{ {
"key": "roomId", "key": "roomId",
"value": "270" "value": "99999"
} }
] ]
} }
...@@ -4430,6 +4660,1279 @@ ...@@ -4430,6 +4660,1279 @@
"response": [] "response": []
} }
] ]
},
{
"name": "[エラー]roomIdを未入力の場合",
"item": [
{
"name": "roomIdを未入力の場合",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 400\", function () {\r",
" pm.response.to.have.status(400);\r",
"});\r",
"\r",
"pm.test(\"roomIdを未入力場合のエラー確認\", function() {\r",
" var errorMessage = pm.response.json().errorMessage;\r",
" pm.expect(errorMessage).eq(\"BAD_REQUEST\")\r",
"})"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "PUT",
"header": [],
"url": {
"raw": "https://chatdev2.abook.bz/acms/fermi/chatapi/room?sid={{sid}}&cmd=3",
"protocol": "https",
"host": [
"chatdev2",
"abook",
"bz"
],
"path": [
"acms",
"fermi",
"chatapi",
"room"
],
"query": [
{
"key": "sid",
"value": "{{sid}}"
},
{
"key": "cmd",
"value": "3"
},
{
"key": "roomId",
"value": "",
"disabled": true
}
]
}
},
"response": []
}
]
},
{
"name": "[エラー]roomIdが空欄の場合",
"item": [
{
"name": "roomIdが空欄の場合",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 400\", function () {\r",
" pm.response.to.have.status(400);\r",
"});\r",
"\r",
"pm.test(\"roomIdが空欄の場合エラー確認\", function() {\r",
" var errorMessage = pm.response.json().errorMessage;\r",
" pm.expect(errorMessage).eq(\"BAD_REQUEST\")\r",
"})"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "PUT",
"header": [],
"url": {
"raw": "https://chatdev2.abook.bz/acms/fermi/chatapi/room?sid={{sid}}&cmd=3&roomId=",
"protocol": "https",
"host": [
"chatdev2",
"abook",
"bz"
],
"path": [
"acms",
"fermi",
"chatapi",
"room"
],
"query": [
{
"key": "sid",
"value": "{{sid}}"
},
{
"key": "cmd",
"value": "3"
},
{
"key": "roomId",
"value": ""
}
]
}
},
"response": []
}
]
}
]
}
]
},
{
"name": "MessageAction API",
"item": [
{
"name": "getMessages",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "https://chatdev2.abook.bz/acms/fermi/chatapi/message?sid={{sid}}&cmd=2&roomId=264&lineNum=0",
"protocol": "https",
"host": [
"chatdev2",
"abook",
"bz"
],
"path": [
"acms",
"fermi",
"chatapi",
"message"
],
"query": [
{
"key": "sid",
"value": "{{sid}}"
},
{
"key": "cmd",
"value": "2"
},
{
"key": "roomId",
"value": "264"
},
{
"key": "lineNum",
"value": "0"
}
]
}
},
"response": [
{
"name": "getMessages",
"originalRequest": {
"method": "GET",
"header": [],
"url": {
"raw": "https://chatdev2.abook.bz/acms/fermi/chatapi/message?sid={{sid}}&cmd=2&roomId=69&lineNum=0",
"protocol": "https",
"host": [
"chatdev2",
"abook",
"bz"
],
"path": [
"acms",
"fermi",
"chatapi",
"message"
],
"query": [
{
"key": "sid",
"value": "{{sid}}"
},
{
"key": "cmd",
"value": "2"
},
{
"key": "roomId",
"value": "69"
},
{
"key": "lineNum",
"value": "0"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Server",
"value": "nginx/1.12.2"
},
{
"key": "Date",
"value": "Thu, 04 Feb 2021 02:31:36 GMT"
},
{
"key": "Content-Type",
"value": "text/plain;charset=UTF-8"
},
{
"key": "Content-Length",
"value": "5908"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Cache-Control",
"value": "no-store, no-cache"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "-1"
}
],
"cookie": [],
"body": "{\n \"httpStatus\": 200,\n \"presentTime\": \"2021-02-04 11:31:36\",\n \"presentTimeUTC\": \"2021-02-04T02:31:36Z\",\n \"body\": {\n \"messageInfoList\": [\n {\n \"message\": \"っっq \",\n \"messageId\": 1175,\n \"shopId\": 59,\n \"shopMemberId\": 883,\n \"messageType\": 0,\n \"time\": {\n \"date\": 3,\n \"day\": 3,\n \"hours\": 17,\n \"minutes\": 22,\n \"month\": 1,\n \"nanos\": 107000000,\n \"seconds\": 13,\n \"time\": 1612340533107,\n \"timezoneOffset\": -540,\n \"year\": 121\n },\n \"cryptedMemberName\": \"fermi3\"\n },\n {\n \"message\": \"<img src=\\\"/acms/fermi/chatapi/file/getImage?fileName=20210125_164209-861IMG_20210122_095430.jpg&amp;roomId=69\\\" id=\\\"attachedImages\\\" style=\\\"max-width:100%\\\" data-title=\\\"20210125_164209-861IMG_20210122_095430.jpg\\\">\",\n \"messageId\": 1161,\n \"shopId\": 59,\n \"shopMemberId\": 890,\n \"messageType\": 1,\n \"time\": {\n \"date\": 25,\n \"day\": 1,\n \"hours\": 16,\n \"minutes\": 42,\n \"month\": 0,\n \"nanos\": 6000000,\n \"seconds\": 10,\n \"time\": 1611560530006,\n \"timezoneOffset\": -540,\n \"year\": 121\n },\n \"cryptedMemberName\": \"fermi6\"\n },\n {\n \"message\": \"<img src=\\\"/acms/fermi/chatapi/file/getImage?fileName=20210125_162358-605IMG_20210122_095430.jpg&amp;roomId=69\\\" id=\\\"attachedImages\\\" style=\\\"max-width:100%\\\" data-title=\\\"20210125_162358-605IMG_20210122_095430.jpg\\\">\",\n \"messageId\": 1160,\n \"shopId\": 59,\n \"shopMemberId\": 890,\n \"messageType\": 1,\n \"time\": {\n \"date\": 25,\n \"day\": 1,\n \"hours\": 16,\n \"minutes\": 23,\n \"month\": 0,\n \"nanos\": 765000000,\n \"seconds\": 59,\n \"time\": 1611559439765,\n \"timezoneOffset\": -540,\n \"year\": 121\n },\n \"cryptedMemberName\": \"fermi6\"\n },\n {\n \"message\": \"<a href=\\\"/acms/fermi/chatapi/file/getImage?fileName=20210125_161822-441IMG_20210122_095430.jpg&amp;roomId=69\\\" id=\\\"attachedImages\\\" data-title=\\\"20210125_161822-441IMG_20210122_095430.jpg\\\"><img src=\\\"/acms/fermi/chatapi/file/getImage?fileName=20210125_161822-441IMG_20210122_095430.jpg&amp;roomId=69\\\" style=\\\"max-width:100%\\\" data-title=\\\"20210125_161822-441IMG_20210122_095430.jpg\\\"></a>\",\n \"messageId\": 1159,\n \"shopId\": 59,\n \"shopMemberId\": 890,\n \"messageType\": 1,\n \"time\": {\n \"date\": 25,\n \"day\": 1,\n \"hours\": 16,\n \"minutes\": 18,\n \"month\": 0,\n \"nanos\": 549000000,\n \"seconds\": 22,\n \"time\": 1611559102549,\n \"timezoneOffset\": -540,\n \"year\": 121\n },\n \"cryptedMemberName\": \"fermi6\"\n },\n {\n \"message\": \"<a href=\\\"/acms/fermi/chatapi/file/getImage?fileName=20210125_161129-744IMG_20210122_095430.jpg&amp;roomId=69\\\" id=\\\"imageFile\\\" data-title=\\\"20210125_161129-744IMG_20210122_095430.jpg\\\"><img src=\\\"/acms/fermi/chatapi/file/getImage?fileName=20210125_161129-744IMG_20210122_095430.jpg&amp;roomId=69\\\" style=\\\"max-width:100%\\\" data-title=\\\"20210125_161129-744IMG_20210122_095430.jpg\\\"></a>\",\n \"messageId\": 1158,\n \"shopId\": 59,\n \"shopMemberId\": 890,\n \"messageType\": 1,\n \"time\": {\n \"date\": 25,\n \"day\": 1,\n \"hours\": 16,\n \"minutes\": 11,\n \"month\": 0,\n \"nanos\": 858000000,\n \"seconds\": 29,\n \"time\": 1611558689858,\n \"timezoneOffset\": -540,\n \"year\": 121\n },\n \"cryptedMemberName\": \"fermi6\"\n },\n {\n \"message\": \"<a href=\\\"/acms/fermi/chatapi/file/getImage?fileName=20210125_155717-778IMG_20210122_095430.jpg&amp;roomId=69\\\" data-lightbox=\\\"attachedImages\\\" data-title=\\\"20210125_155717-778IMG_20210122_095430.jpg\\\"><img src=\\\"/acms/fermi/chatapi/file/getImage?fileName=20210125_155717-778IMG_20210122_095430.jpg&amp;roomId=69\\\" style=\\\"max-width:100%\\\"></a>\",\n \"messageId\": 1157,\n \"shopId\": 59,\n \"shopMemberId\": 890,\n \"messageType\": 1,\n \"time\": {\n \"date\": 25,\n \"day\": 1,\n \"hours\": 15,\n \"minutes\": 57,\n \"month\": 0,\n \"nanos\": 29000000,\n \"seconds\": 21,\n \"time\": 1611557841029,\n \"timezoneOffset\": -540,\n \"year\": 121\n },\n \"cryptedMemberName\": \"fermi6\"\n },\n {\n \"message\": \"<a href=\\\"/acms/fermi/chatapi/file/getImage?fileName=20210125_154440-387IMG_20210122_095430.jpg&amp;roomId=69\\\" data-lightbox=\\\"attachedImages\\\" data-title=\\\"20210125_154440-387IMG_20210122_095430.jpg\\\"><img src=\\\"/acms/fermi/chatapi/file/getImage?fileName=20210125_154440-387IMG_20210122_095430.jpg&amp;roomId=69\\\" style=\\\"max-width:100%\\\"><a href=\\\"/acms/fermi/chatapi/file/download?fileName=20210125_154440-387IMG_20210122_095430.jpg&amp;roomId=69\\\" class=\\\"fa fa-download\\\" download=\\\"20210125_154440-348IMG_20210122_095430.jpg\\\"></a></a>\",\n \"messageId\": 1156,\n \"shopId\": 59,\n \"shopMemberId\": 890,\n \"messageType\": 1,\n \"time\": {\n \"date\": 25,\n \"day\": 1,\n \"hours\": 15,\n \"minutes\": 44,\n \"month\": 0,\n \"nanos\": 496000000,\n \"seconds\": 40,\n \"time\": 1611557080496,\n \"timezoneOffset\": -540,\n \"year\": 121\n },\n \"cryptedMemberName\": \"fermi6\"\n },\n {\n \"message\": \"<a href=\\\"/acms/fermi/chatapi/file/getImage?fileName=20210125_153357-898IMG_20210122_095430.jpg&amp;roomId=69\\\" id=\\\"imageFile\\\" data-title=\\\"20210125_153357-898IMG_20210122_095430.jpg\\\"><img src=\\\"/acms/fermi/chatapi/file/getImage?fileName=20210125_153357-898IMG_20210122_095430.jpg&amp;roomId=69\\\" style=\\\"max-width:100%\\\"></a>\",\n \"messageId\": 1155,\n \"shopId\": 59,\n \"shopMemberId\": 890,\n \"messageType\": 1,\n \"time\": {\n \"date\": 25,\n \"day\": 1,\n \"hours\": 15,\n \"minutes\": 33,\n \"month\": 0,\n \"nanos\": 17000000,\n \"seconds\": 58,\n \"time\": 1611556438017,\n \"timezoneOffset\": -540,\n \"year\": 121\n },\n \"cryptedMemberName\": \"fermi6\"\n },\n {\n \"message\": \"<img src=\\\"/acms/fermi/chatapi/file/getImage?fileName=20210125_151740-006IMG_20210122_095430.jpg&amp;roomId=69\\\" style=\\\"max-width:100%\\\">\",\n \"messageId\": 1154,\n \"shopId\": 59,\n \"shopMemberId\": 890,\n \"messageType\": 1,\n \"time\": {\n \"date\": 25,\n \"day\": 1,\n \"hours\": 15,\n \"minutes\": 17,\n \"month\": 0,\n \"nanos\": 712000000,\n \"seconds\": 40,\n \"time\": 1611555460712,\n \"timezoneOffset\": -540,\n \"year\": 121\n },\n \"cryptedMemberName\": \"fermi6\"\n },\n {\n \"message\": \"<a href=\\\"/acms/fermi/chatapi/file/getImage?fileName=20210122_184812-349IMG_20210122_095430.jpg&amp;roomId=69\\\" data-lightbox=\\\"attachedImages\\\" data-title=\\\"20210122_184812-349IMG_20210122_095430.jpg\\\"><img src=\\\"/acms/fermi/chatapi/file/getImage?fileName=20210122_184812-349IMG_20210122_095430.jpg&amp;roomId=69\\\" style=\\\"max-width:100%\\\"><a href=\\\"/acms/fermi/chatapi/file/download?fileName=20210122_184812-349IMG_20210122_095430.jpg&amp;roomId=69\\\" class=\\\"fa fa-download\\\" download=\\\"20210122_184812-301IMG_20210122_095430.jpg\\\"></a></a>\",\n \"messageId\": 1153,\n \"shopId\": 59,\n \"shopMemberId\": 890,\n \"imageName\": \"20210122_184812-349IMG_20210122_095430.jpg\",\n \"downloadFileName\": \"20210122_184812-301IMG_20210122_095430.jpg\",\n \"messageType\": 1,\n \"time\": {\n \"date\": 22,\n \"day\": 5,\n \"hours\": 18,\n \"minutes\": 48,\n \"month\": 0,\n \"nanos\": 485000000,\n \"seconds\": 12,\n \"time\": 1611308892485,\n \"timezoneOffset\": -540,\n \"year\": 121\n },\n \"cryptedMemberName\": \"fermi6\"\n }\n ]\n }\n}"
}
]
}
]
},
{
"name": "FavoriteAction API",
"item": [
{
"name": "addFavoriteUser API",
"item": [
{
"name": "addFavoriteUser",
"item": [
{
"name": "addFavoriteUser",
"event": [
{
"listen": "prerequest",
"script": {
"exec": [
"pm.test(\"request取得\",function(){\r",
" var url = request.url;\r",
" let map = new Map();\r",
" var parameters = (url.slice(url.indexOf('?') + 1, url.length)).split('&');\r",
" for (var i = 0; i < parameters.length; i++) { \r",
" var param = parameters[i].split('=');\r",
" map.set(param[0],param[1])\r",
" }\r",
" pm.globals.set(\"targetUserId\", map.get(\"targetUserId\"));\r",
"});"
],
"type": "text/javascript"
}
},
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function () {\r",
" pm.response.to.have.status(200);\r",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [],
"url": {
"raw": "https://chatdev2.abook.bz/acms/fermi/chatapi/favorite?sid={{sid}}&cmd=1&targetUserId=950",
"protocol": "https",
"host": [
"chatdev2",
"abook",
"bz"
],
"path": [
"acms",
"fermi",
"chatapi",
"favorite"
],
"query": [
{
"key": "sid",
"value": "{{sid}}"
},
{
"key": "cmd",
"value": "1"
},
{
"key": "targetUserId",
"value": "950"
}
]
}
},
"response": []
},
{
"name": "お気に入りユーザー確認",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function () {\r",
" pm.response.to.have.status(200);\r",
"});\r",
"\r",
"pm.test(\"お気に入りユーザーが追加されたことを確認\", function() {\r",
" var targetUserId = pm.globals.get(\"targetUserId\");\r",
" var favoriteUserIds = pm.response.json().body.favoriteUserIds;\r",
"\r",
" let map = new Map();\r",
" for (var i = 0; i < favoriteUserIds.length; i++) {\r",
" map.set(favoriteUserIds[i], favoriteUserIds[i]);\r",
" }\r",
" var favoriteId = map.get(Number(targetUserId));\r",
" pm.expect(favoriteId).not.eq(undefined)\r",
"})"
],
"type": "text/javascript"
}
}
],
"protocolProfileBehavior": {
"disabledSystemHeaders": {
"user-agent": true
}
},
"request": {
"method": "GET",
"header": [
{
"key": "User-Agent",
"value": "Android",
"type": "text"
}
],
"url": {
"raw": "http://localhost:8080/acms/fermi/chatapi/favorite?sid={{sid}}&cmd=4",
"protocol": "http",
"host": [
"localhost"
],
"port": "8080",
"path": [
"acms",
"fermi",
"chatapi",
"favorite"
],
"query": [
{
"key": "sid",
"value": "{{sid}}"
},
{
"key": "cmd",
"value": "4"
}
]
}
},
"response": []
}
]
},
{
"name": "[エラー]targetUserIdを未入力場合",
"item": [
{
"name": "targetUserIdを未入力場合",
"event": [
{
"listen": "prerequest",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
},
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 400\", function () {\r",
" pm.response.to.have.status(400);\r",
"});\r",
"\r",
"pm.test(\"targetUserIdを未入力のエラー確認\", function() {\r",
" var errorMessage = pm.response.json().errorMessage;\r",
"\r",
" pm.expect(errorMessage).eq(\"BAD_REQUEST\");\r",
"})"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [],
"url": {
"raw": "https://chatdev2.abook.bz/acms/fermi/chatapi/favorite?sid={{sid}}&cmd=1",
"protocol": "https",
"host": [
"chatdev2",
"abook",
"bz"
],
"path": [
"acms",
"fermi",
"chatapi",
"favorite"
],
"query": [
{
"key": "sid",
"value": "{{sid}}"
},
{
"key": "cmd",
"value": "1"
},
{
"key": "targetUserId",
"value": "950",
"disabled": true
}
]
}
},
"response": []
}
]
},
{
"name": "[エラー]targetUserIdが空欄の場合",
"item": [
{
"name": "targetUserIdが空欄の場合",
"event": [
{
"listen": "prerequest",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
},
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 400\", function () {\r",
" pm.response.to.have.status(400);\r",
"});\r",
"\r",
"pm.test(\"targetUserIdが空欄のエラー確認\", function() {\r",
" var errorMessage = pm.response.json().errorMessage;\r",
"\r",
" pm.expect(errorMessage).eq(\"BAD_REQUEST\");\r",
"})"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [],
"url": {
"raw": "https://chatdev2.abook.bz/acms/fermi/chatapi/favorite?sid={{sid}}&cmd=1&targetUserId=",
"protocol": "https",
"host": [
"chatdev2",
"abook",
"bz"
],
"path": [
"acms",
"fermi",
"chatapi",
"favorite"
],
"query": [
{
"key": "sid",
"value": "{{sid}}"
},
{
"key": "cmd",
"value": "1"
},
{
"key": "targetUserId",
"value": ""
}
]
}
},
"response": []
}
]
},
{
"name": "[エラー]targetUserIdを文字に入力場合",
"item": [
{
"name": "targetUserIdを文字に入力場合",
"event": [
{
"listen": "prerequest",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
},
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 400\", function () {\r",
" pm.response.to.have.status(400);\r",
"});\r",
"\r",
"pm.test(\"targetUserIdを文字に入力のエラー確認\", function() {\r",
" var errorMessage = pm.response.json().errorMessage;\r",
"\r",
" pm.expect(errorMessage[0]).eq(\"targetUserIdは整数(最大2147483647)でなければいけません。\");\r",
"})"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [],
"url": {
"raw": "https://chatdev2.abook.bz/acms/fermi/chatapi/favorite?sid={{sid}}&cmd=1&targetUserId=test",
"protocol": "https",
"host": [
"chatdev2",
"abook",
"bz"
],
"path": [
"acms",
"fermi",
"chatapi",
"favorite"
],
"query": [
{
"key": "sid",
"value": "{{sid}}"
},
{
"key": "cmd",
"value": "1"
},
{
"key": "targetUserId",
"value": "test"
}
]
}
},
"response": []
}
]
},
{
"name": "[エラー]targetUserIdがDB存在しない場合",
"item": [
{
"name": "targetUserIdがDB存在しない場合",
"event": [
{
"listen": "prerequest",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
},
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 400\", function () {\r",
" pm.response.to.have.status(400);\r",
"});\r",
"\r",
"pm.test(\"[エラー]targetUserIdがDB存在しない場合のエラー確認\", function() {\r",
" var errorMessage = pm.response.json().errorMessage;\r",
"\r",
" pm.expect(errorMessage).eq(\"BAD_REQUEST\");\r",
"})"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [],
"url": {
"raw": "https://chatdev2.abook.bz/acms/fermi/chatapi/favorite?sid={{sid}}&cmd=1&targetUserId=99999",
"protocol": "https",
"host": [
"chatdev2",
"abook",
"bz"
],
"path": [
"acms",
"fermi",
"chatapi",
"favorite"
],
"query": [
{
"key": "sid",
"value": "{{sid}}"
},
{
"key": "cmd",
"value": "1"
},
{
"key": "targetUserId",
"value": "99999"
}
]
}
},
"response": []
}
]
}
]
},
{
"name": "addFavoriteGroup API",
"item": [
{
"name": "addFavoriteGroup",
"item": [
{
"name": "addFavoriteGroup",
"event": [
{
"listen": "prerequest",
"script": {
"exec": [
"pm.test(\"request取得\",function(){\r",
" var url = request.url;\r",
" let map = new Map();\r",
" var parameters = (url.slice(url.indexOf('?') + 1, url.length)).split('&');\r",
" for (var i = 0; i < parameters.length; i++) { \r",
" var param = parameters[i].split('=');\r",
" map.set(param[0],param[1])\r",
" }\r",
" pm.globals.set(\"targetGroupId\", map.get(\"targetGroupId\"));\r",
"});"
],
"type": "text/javascript"
}
},
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function () {\r",
" pm.response.to.have.status(200);\r",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [],
"url": {
"raw": "https://chatdev2.abook.bz/acms/fermi/chatapi/favorite?sid={{sid}}&cmd=2&targetGroupId=1373",
"protocol": "https",
"host": [
"chatdev2",
"abook",
"bz"
],
"path": [
"acms",
"fermi",
"chatapi",
"favorite"
],
"query": [
{
"key": "sid",
"value": "{{sid}}"
},
{
"key": "cmd",
"value": "2"
},
{
"key": "targetGroupId",
"value": "1373"
}
]
}
},
"response": []
},
{
"name": "お気に入りグループ確認",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function () {\r",
" pm.response.to.have.status(200);\r",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "https://chatdev2.abook.bz/acms/fermi/chatapi/favorite?sid={{sid}}&cmd=5",
"protocol": "https",
"host": [
"chatdev2",
"abook",
"bz"
],
"path": [
"acms",
"fermi",
"chatapi",
"favorite"
],
"query": [
{
"key": "sid",
"value": "{{sid}}"
},
{
"key": "cmd",
"value": "5"
}
]
}
},
"response": []
}
]
},
{
"name": "[エラー]targetGroupIdを未入力場合",
"item": [
{
"name": "targetGroupIdを未入力場合",
"event": [
{
"listen": "prerequest",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
},
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 400\", function () {\r",
" pm.response.to.have.status(400);\r",
"});\r",
"\r",
"pm.test(\"targetGroupIdを未入力場合場合のエラー確認\", function() {\r",
" var errorMessage = pm.response.json().errorMessage;\r",
" pm.expect(errorMessage).eq(\"BAD_REQUEST\")\r",
"})"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [],
"url": {
"raw": "https://chatdev2.abook.bz/acms/fermi/chatapi/favorite?sid={{sid}}&cmd=2",
"protocol": "https",
"host": [
"chatdev2",
"abook",
"bz"
],
"path": [
"acms",
"fermi",
"chatapi",
"favorite"
],
"query": [
{
"key": "sid",
"value": "{{sid}}"
},
{
"key": "cmd",
"value": "2"
},
{
"key": "targetGroupId",
"value": "1373",
"disabled": true
}
]
}
},
"response": []
}
]
},
{
"name": "[エラー]targetGroupIdが空欄の場合",
"item": [
{
"name": "targetGroupIdが空欄の場合",
"event": [
{
"listen": "prerequest",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
},
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 400\", function () {\r",
" pm.response.to.have.status(400);\r",
"});\r",
"\r",
"pm.test(\"targetGroupIdが空欄の場合のエラー確認\", function() {\r",
" var errorMessage = pm.response.json().errorMessage;\r",
" pm.expect(errorMessage).eq(\"BAD_REQUEST\")\r",
"})"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [],
"url": {
"raw": "https://chatdev2.abook.bz/acms/fermi/chatapi/favorite?sid={{sid}}&cmd=2&targetGroupId=",
"protocol": "https",
"host": [
"chatdev2",
"abook",
"bz"
],
"path": [
"acms",
"fermi",
"chatapi",
"favorite"
],
"query": [
{
"key": "sid",
"value": "{{sid}}"
},
{
"key": "cmd",
"value": "2"
},
{
"key": "targetGroupId",
"value": ""
}
]
}
},
"response": []
}
]
},
{
"name": "[エラー]targetGroupIdを文字に入力場合",
"item": [
{
"name": "targetGroupIdを文字に入力場合",
"event": [
{
"listen": "prerequest",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
},
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 400\", function () {\r",
" pm.response.to.have.status(400);\r",
"});\r",
"\r",
"pm.test(\"targetGroupIdを文字に入力場合のエラー確認\", function() {\r",
" var errorMessage = pm.response.json().errorMessage;\r",
" pm.expect(errorMessage[0]).eq(\"targetGroupIdは整数(最大2147483647)でなければいけません。\")\r",
"})"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [],
"url": {
"raw": "https://chatdev2.abook.bz/acms/fermi/chatapi/favorite?sid={{sid}}&cmd=2&targetGroupId=test",
"protocol": "https",
"host": [
"chatdev2",
"abook",
"bz"
],
"path": [
"acms",
"fermi",
"chatapi",
"favorite"
],
"query": [
{
"key": "sid",
"value": "{{sid}}"
},
{
"key": "cmd",
"value": "2"
},
{
"key": "targetGroupId",
"value": "test"
}
]
}
},
"response": []
}
]
},
{
"name": "[エラー]targetGroupIdがDBに存在しない場合",
"item": [
{
"name": "targetGroupIdがDBに存在しない場合",
"event": [
{
"listen": "prerequest",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
},
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 400\", function () {\r",
" pm.response.to.have.status(400);\r",
"});\r",
"\r",
"pm.test(\"targetGroupIdがDBに存在しない場合のエラー確認\", function() {\r",
" var errorMessage = pm.response.json().errorMessage;\r",
" pm.expect(errorMessage).eq(\"BAD_REQUEST\")\r",
"})"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [],
"url": {
"raw": "https://chatdev2.abook.bz/acms/fermi/chatapi/favorite?sid={{sid}}&cmd=2&targetGroupId=99999",
"protocol": "https",
"host": [
"chatdev2",
"abook",
"bz"
],
"path": [
"acms",
"fermi",
"chatapi",
"favorite"
],
"query": [
{
"key": "sid",
"value": "{{sid}}"
},
{
"key": "cmd",
"value": "2"
},
{
"key": "targetGroupId",
"value": "99999"
}
]
}
},
"response": []
}
]
}
]
},
{
"name": "getFavoriteUser API",
"item": [
{
"name": "getFavoriteUser",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function () {\r",
" pm.response.to.have.status(200);\r",
"});"
],
"type": "text/javascript"
}
}
],
"protocolProfileBehavior": {
"disabledSystemHeaders": {
"user-agent": true
}
},
"request": {
"method": "GET",
"header": [
{
"key": "User-Agent",
"value": "Android",
"type": "text"
}
],
"url": {
"raw": "http://localhost:8080/acms/fermi/chatapi/favorite?sid={{sid}}&cmd=4",
"protocol": "http",
"host": [
"localhost"
],
"port": "8080",
"path": [
"acms",
"fermi",
"chatapi",
"favorite"
],
"query": [
{
"key": "sid",
"value": "{{sid}}"
},
{
"key": "cmd",
"value": "4"
}
]
}
},
"response": []
}
]
},
{
"name": "getFavoriteGroup API",
"item": [
{
"name": "getFavoriteGroup",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function () {\r",
" pm.response.to.have.status(200);\r",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://localhost:8080/acms/fermi/chatapi/favorite?sid={{sid}}&cmd=5",
"protocol": "http",
"host": [
"localhost"
],
"port": "8080",
"path": [
"acms",
"fermi",
"chatapi",
"favorite"
],
"query": [
{
"key": "sid",
"value": "{{sid}}"
},
{
"key": "cmd",
"value": "5"
}
]
}
},
"response": []
}
]
},
{
"name": "removeFavoriteUser API",
"item": [
{
"name": "removeFavoriteUser",
"request": {
"method": "DELETE",
"header": [],
"url": {
"raw": "http://localhost:8080/acms/fermi/chatapi/favorite?sid={{sid}}&cmd=7&targetUserId=938",
"protocol": "http",
"host": [
"localhost"
],
"port": "8080",
"path": [
"acms",
"fermi",
"chatapi",
"favorite"
],
"query": [
{
"key": "sid",
"value": "{{sid}}"
},
{
"key": "cmd",
"value": "7"
},
{
"key": "targetUserId",
"value": "938"
}
]
}
},
"response": []
}
]
},
{
"name": "removeFavoriteGroup API",
"item": [
{
"name": "removeFavoriteGroup",
"request": {
"method": "DELETE",
"header": [],
"url": {
"raw": "http://localhost:8080/acms/fermi/chatapi/favorite?sid={{sid}}&cmd=8&targetGroupId=1373",
"protocol": "http",
"host": [
"localhost"
],
"port": "8080",
"path": [
"acms",
"fermi",
"chatapi",
"favorite"
],
"query": [
{
"key": "sid",
"value": "{{sid}}"
},
{
"key": "cmd",
"value": "8"
},
{
"key": "targetGroupId",
"value": "1373"
}
]
}
},
"response": []
} }
] ]
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment