Commit 78493292 by Lee Daehyun

postman createNewRoom, getChatRoom, exitRoom API テスト

parent 2ad8b4ab
......@@ -2370,7 +2370,7 @@
},
"response": [
{
"name": "groupIdを未入力の場合",
"name": "groupIdsを未入力の場合",
"originalRequest": {
"method": "GET",
"header": [],
......@@ -3114,6 +3114,9 @@
"name": "getChatRooms API",
"item": [
{
"name": "[User]がチャット一覧を確認できる",
"item": [
{
"name": "Login-\"API_test_a\"",
"event": [
{
......@@ -3227,6 +3230,19 @@
},
{
"name": "getChatRooms",
"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
......@@ -3242,12 +3258,12 @@
}
],
"url": {
"raw": "https://chatdev2.agentec.jp/acms/fermi/chatapi/room?sid={{sid}}&cmd=5",
"raw": "https://chatdev2.abook.bz/acms/fermi/chatapi/room?sid={{sid}}&cmd=5",
"protocol": "https",
"host": [
"chatdev2",
"agentec",
"jp"
"abook",
"bz"
],
"path": [
"acms",
......@@ -3270,22 +3286,164 @@
"response": []
}
]
}
]
},
{
"name": "createNewRoom API",
"item": [
{
"name": "[User]がチャットルームを生成できる",
"item": [
{
"name": "Login-\"API_test_a\"",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var sid = pm.response.json().sid;\r",
"pm.globals.set(\"sid\",sid);"
],
"type": "text/javascript"
}
},
{
"listen": "prerequest",
"script": {
"exec": [
"pm.globals.set(\"JOIN\",\"1\");\r",
"pm.globals.set(\"JOINROOM\",\"2\");\r",
"pm.globals.set(\"INVITEUSERS\",\"3\");\r",
"pm.globals.set(\"GETGROUPLIST\",\"4\");\r",
"pm.globals.set(\"GETUSERLISTINGROUP\",\"5\");\r",
"\r",
"pm.globals.set(\"getRoomList\",\"1\");\r",
"pm.globals.set(\"createNewRoom\",\"2\");\r",
"pm.globals.set(\"exitRoom\",\"3\");\r",
"pm.globals.set(\"disconnect\",\"4\");\r",
"\r",
"pm.globals.set(\"createMessage\",\"1\");\r",
"pm.globals.set(\"getMessages\",\"2\");\r",
"pm.globals.set(\"roomSearch\",\"3\");\r",
"\r",
"pm.globals.set(\"getPushMessage\",\"1\");\r",
""
],
"type": "text/javascript"
}
}
],
"protocolProfileBehavior": {
"disabledSystemHeaders": {
"user-agent": true
}
},
"request": {
"method": "POST",
"header": [
{
"key": "User-Agent",
"type": "text",
"value": "Android"
}
],
"url": {
"raw": "https://chatdev2.abook.bz/acms/nuabvapi/appStoreNewLogin?appId=3&appVersion=1.2.360&deviceToken=dxDH1UITl-E%3AAPA91bHwZrP6-fXgAXiiApiPdH7Ai1cQFrc1FiTwWz85w5spAK56O1VHk0aV7BrB0uCvAccd2pkWaVQU-HORHLVpRt54xvyWKdh9mJ3Pg06tDFqFw0X6xaVTQ20rA8zeUdX6ZS-BVtzc&deviceTypeId=3&language=en&loginId=API_test_a&ma&password=111111&uid=578529ca22cab829.androidid&urlPath=fermi",
"protocol": "https",
"host": [
"chatdev2",
"abook",
"bz"
],
"path": [
"acms",
"nuabvapi",
"appStoreNewLogin"
],
"query": [
{
"key": "appId",
"value": "3"
},
{
"key": "appVersion",
"value": "1.2.360"
},
{
"key": "deviceToken",
"value": "dxDH1UITl-E%3AAPA91bHwZrP6-fXgAXiiApiPdH7Ai1cQFrc1FiTwWz85w5spAK56O1VHk0aV7BrB0uCvAccd2pkWaVQU-HORHLVpRt54xvyWKdh9mJ3Pg06tDFqFw0X6xaVTQ20rA8zeUdX6ZS-BVtzc"
},
{
"key": "deviceTypeId",
"value": "3"
},
{
"key": "language",
"value": "en"
},
{
"key": "loginId",
"value": "API_test_a"
},
{
"key": "ma",
"value": null
},
{
"key": "password",
"value": "111111"
},
{
"key": "uid",
"value": "578529ca22cab829.androidid"
},
{
"key": "urlPath",
"value": "fermi"
}
]
}
},
"response": []
},
{
"name": "createNewRoom",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function () {\r",
" pm.response.to.have.status(200);\r",
"});\r",
"\r",
"var createNewRoomJson = pm.response.json().body\r",
"pm.globals.set(\"createNewRoomJson\",createNewRoomJson)"
],
"type": "text/javascript"
}
},
{
"listen": "prerequest",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [],
"url": {
"raw": "https://chatdev2.agentec.jp/acms/fermi/chatapi/room?sid={{sid}}&cmd=2",
"raw": "https://chatdev2.abook.bz/acms/fermi/chatapi/room?sid={{sid}}&cmd=2&roomType=2&inviteMemberIds=946&newRoomName=createNewRoomTest",
"protocol": "https",
"host": [
"chatdev2",
"agentec",
"jp"
"abook",
"bz"
],
"path": [
"acms",
......@@ -3301,17 +3459,979 @@
{
"key": "cmd",
"value": "2"
},
{
"key": "roomType",
"value": "2"
},
{
"key": "inviteMemberIds",
"value": "946"
},
{
"key": "newRoomName",
"value": "createNewRoomTest"
}
]
}
},
"response": []
"response": [
{
"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",
"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"
},
{
"key": "newRoomName",
"value": "createNewRoomTest"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "plain",
"header": [
{
"key": "Server",
"value": "nginx/1.12.2"
},
{
"name": "exitRoom API",
"item": []
"key": "Date",
"value": "Fri, 26 Feb 2021 05:38:32 GMT"
},
{
"key": "Content-Type",
"value": "text/plain;charset=UTF-8"
},
{
"key": "Content-Length",
"value": "382"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Cache-Control",
"value": "no-store, no-cache"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "-1"
}
],
"cookie": [],
"body": "{\"httpStatus\":200,\"presentTime\":\"2021-02-26 14:38:31\",\"presentTimeUTC\":\"2021-02-26T05:38:31Z\",\"body\":{\"chatRoomInfo\":{\"roomId\":265,\"roomName\":\"createNewRoomTest\",\"roomType\":2,\"attendUsers\":[{\"memberName\":\"API_test_a\",\"shopMemberId\":945,\"profileImagePath\":\"/mnt/nas/ABK/S0059/USER/API_test_a/API_test_a.jpg\",\"del_flg\":0},{\"memberName\":\"API_test_b\",\"shopMemberId\":946,\"del_flg\":0}]}}}"
}
]
},
{
"name": "getChatRooms",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function() {\r",
" pm.response.to.have.status(200);\r",
"});\r",
"\r",
"var createNewRoomJson = pm.globals.get(\"createNewRoomJson\")\r",
"var chatRoomInfoList = pm.response.json().body.chatRoomInfoList;\r",
"\r",
"pm.test(\"チャットルームを生成確認\", function() {\r",
" for (var i = 0; i < chatRoomInfoList.length; i++) {\r",
" if (chatRoomInfoList[i].roomId == createNewRoomJson.roomId){\r",
" pm.expect(chatRoomInfoList[i].roomId).eq(createNewRoomJson.roomId)\r",
" pm.expect(chatRoomInfoList[i].roomType).eq(createNewRoomJson.roomType)\r",
" }\r",
" }\r",
"})"
],
"type": "text/javascript"
}
}
],
"protocolProfileBehavior": {
"disabledSystemHeaders": {
"user-agent": true
}
},
"request": {
"method": "GET",
"header": [
{
"key": "User-Agent",
"value": "Android",
"type": "text"
}
],
"url": {
"raw": "https://chatdev2.abook.bz/acms/fermi/chatapi/room?sid={{sid}}&cmd=5",
"protocol": "https",
"host": [
"chatdev2",
"abook",
"bz"
],
"path": [
"acms",
"fermi",
"chatapi",
"room"
],
"query": [
{
"key": "sid",
"value": "{{sid}}"
},
{
"key": "cmd",
"value": "5"
}
]
}
},
"response": []
}
]
},
{
"name": "[User]がチャットルーム生成時同じ参加者を含めているチャットルームがある場合",
"item": [
{
"name": "createNewRoom",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function () {\r",
" pm.response.to.have.status(200);\r",
"});\r",
"\r",
"var createNewRoomJson = pm.response.json().body\r",
"pm.globals.set(\"createNewRoomJson\",createNewRoomJson)"
],
"type": "text/javascript"
}
},
{
"listen": "prerequest",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [],
"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"
}
]
}
},
"response": [
{
"name": "createNewRoom",
"originalRequest": {
"method": "POST",
"header": [],
"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": "plain",
"header": [
{
"key": "Server",
"value": "nginx/1.12.2"
},
{
"key": "Date",
"value": "Fri, 26 Feb 2021 05:41:46 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": "{\"httpStatus\":200,\"presentTime\":\"2021-02-26 14:41:46\",\"presentTimeUTC\":\"2021-02-26T05:41:46Z\",\"body\":{\"roomId\":264,\"roomType\":2}}"
}
]
}
]
},
{
"name": "[エラー]roomType未入力の場合",
"item": [
{
"name": "roomType未入力の場合",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function () {\r",
" pm.response.to.have.status(200);\r",
"});\r",
"\r",
"var createNewRoomJson = pm.response.json().body\r",
"pm.globals.set(\"createNewRoomJson\",createNewRoomJson)"
],
"type": "text/javascript"
}
},
{
"listen": "prerequest",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [],
"url": {
"raw": "https://chatdev2.abook.bz/acms/fermi/chatapi/room?sid={{sid}}&cmd=2&inviteMemberIds=946&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": "",
"disabled": true
},
{
"key": "inviteMemberIds",
"value": "946"
},
{
"key": "newRoomName",
"value": "createNewRoomTest"
}
]
}
},
"response": []
}
]
},
{
"name": "[エラー]inviteMemberIds未入力の場合",
"item": [
{
"name": "inviteMemberIds未入力の場合",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function () {\r",
" pm.response.to.have.status(200);\r",
"});\r",
"\r",
"var createNewRoomJson = pm.response.json().body\r",
"pm.globals.set(\"createNewRoomJson\",createNewRoomJson)"
],
"type": "text/javascript"
}
},
{
"listen": "prerequest",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [],
"url": {
"raw": "https://chatdev2.abook.bz/acms/fermi/chatapi/room?sid={{sid}}&cmd=2&roomType=2&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": "",
"disabled": true
},
{
"key": "newRoomName",
"value": "createNewRoomTest"
}
]
}
},
"response": []
}
]
},
{
"name": "[エラー]newRoomName未入力の場合",
"item": [
{
"name": "newRoomName未入力の場合",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function () {\r",
" pm.response.to.have.status(200);\r",
"});\r",
"\r",
"var createNewRoomJson = pm.response.json().body\r",
"pm.globals.set(\"createNewRoomJson\",createNewRoomJson)"
],
"type": "text/javascript"
}
},
{
"listen": "prerequest",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [],
"url": {
"raw": "https://chatdev2.abook.bz/acms/fermi/chatapi/room?sid={{sid}}&cmd=2&roomType=2&inviteMemberIds=946",
"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"
},
{
"key": "newRoomName",
"value": "",
"disabled": true
}
]
}
},
"response": []
}
]
},
{
"name": "[エラー]roomType空欄の場合",
"item": [
{
"name": "roomType空欄場合",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function () {\r",
" pm.response.to.have.status(200);\r",
"});\r",
"\r",
"var createNewRoomJson = pm.response.json().body\r",
"pm.globals.set(\"createNewRoomJson\",createNewRoomJson)"
],
"type": "text/javascript"
}
},
{
"listen": "prerequest",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [],
"url": {
"raw": "https://chatdev2.abook.bz/acms/fermi/chatapi/room?sid={{sid}}&cmd=2&roomType=&inviteMemberIds=946&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": ""
},
{
"key": "inviteMemberIds",
"value": "946"
},
{
"key": "newRoomName",
"value": "createNewRoomTest"
}
]
}
},
"response": []
}
]
},
{
"name": "[エラー]inviteMemberIds空欄の場合 Copy",
"item": [
{
"name": "inviteMemberIds空欄の場合",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function () {\r",
" pm.response.to.have.status(200);\r",
"});\r",
"\r",
"var createNewRoomJson = pm.response.json().body\r",
"pm.globals.set(\"createNewRoomJson\",createNewRoomJson)"
],
"type": "text/javascript"
}
},
{
"listen": "prerequest",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [],
"url": {
"raw": "https://chatdev2.abook.bz/acms/fermi/chatapi/room?sid={{sid}}&cmd=2&roomType=2&inviteMemberIds=&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": ""
},
{
"key": "newRoomName",
"value": "createNewRoomTest"
}
]
}
},
"response": []
}
]
},
{
"name": "[エラー]newRoomName空欄の場合 Copy",
"item": [
{
"name": "newRoomName空欄の場合",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function () {\r",
" pm.response.to.have.status(200);\r",
"});\r",
"\r",
"var createNewRoomJson = pm.response.json().body\r",
"pm.globals.set(\"createNewRoomJson\",createNewRoomJson)"
],
"type": "text/javascript"
}
},
{
"listen": "prerequest",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [],
"url": {
"raw": "https://chatdev2.abook.bz/acms/fermi/chatapi/room?sid={{sid}}&cmd=2&roomType=2&inviteMemberIds=946&newRoomName=",
"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"
},
{
"key": "newRoomName",
"value": ""
}
]
}
},
"response": []
}
]
}
]
},
{
"name": "exitRoom API",
"item": [
{
"name": "[User]がチャットルームから脱出できる",
"item": [
{
"name": "新しいチャットルームを生成",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function () {\r",
" pm.response.to.have.status(200);\r",
"});\r",
"\r",
"var jsonData = pm.response.json().body.chatRoomInfo\r",
"pm.globals.set(\"roomId\", jsonData.roomId)\r",
"pm.globals.set(\"roomType\", jsonData.roomType)"
],
"type": "text/javascript"
}
},
{
"listen": "prerequest",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [],
"url": {
"raw": "https://chatdev2.abook.bz/acms/fermi/chatapi/room?sid={{sid}}&cmd=2&roomType=2&inviteMemberIds=948&newRoomName=exitRoomTest",
"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": "948"
},
{
"key": "newRoomName",
"value": "exitRoomTest"
}
]
}
},
"response": []
},
{
"name": "チャットルーム一覧確認",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function () {\r",
" pm.response.to.have.status(200);\r",
"});\r",
"\r",
"var roomId = pm.globals.get(\"roomId\");\r",
"var chatRoomInfoList = pm.response.json().body.chatRoomInfoList;\r",
"\r",
"pm.test(\"生成したチャットルーム確認\", function() {\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",
" var searchRoomId = map.get(roomId);\r",
" pm.expect(searchRoomId).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": "https://chatdev2.abook.bz/acms/fermi/chatapi/room?sid={{sid}}&cmd=5",
"protocol": "https",
"host": [
"chatdev2",
"abook",
"bz"
],
"path": [
"acms",
"fermi",
"chatapi",
"room"
],
"query": [
{
"key": "sid",
"value": "{{sid}}"
},
{
"key": "cmd",
"value": "5"
}
]
}
},
"response": []
},
{
"name": "exitRoom",
"request": {
"method": "PUT",
"header": [],
"url": {
"raw": "https://chatdev2.abook.bz/acms/fermi/chatapi/room?sid={{sid}}&cmd=3&roomId=270",
"protocol": "https",
"host": [
"chatdev2",
"abook",
"bz"
],
"path": [
"acms",
"fermi",
"chatapi",
"room"
],
"query": [
{
"key": "sid",
"value": "{{sid}}"
},
{
"key": "cmd",
"value": "3"
},
{
"key": "roomId",
"value": "270"
}
]
}
},
"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