Commit 2e376d07 by Lee Daehyun

Communication_API JOINテスト

parent c5a12bbc
{
"info": {
"_postman_id": "f558c7b6-5cd6-4100-acc1-5103957b29f2",
"name": "AbookCheck_communication",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "LoginAPI",
"item": [
{
"name": "AppStoreNewLoginAction",
"protocolProfileBehavior": {
"disabledSystemHeaders": {
"user-agent": true
}
},
"request": {
"method": "GET",
"header": [
{
"key": "User-Agent",
"value": "Android",
"type": "text"
}
],
"url": {
"raw": "http://localhost:8080/acms/nuabvapi/appStoreNewLogin?appId=3&appVersion=1.2.360&deviceToken=dxDH1UITl-E%3AAPA91bHwZrP6-fXgAXiiApiPdH7Ai1cQFrc1FiTwWz85w5spAK56O1VHk0aV7BrB0uCvAccd2pkWaVQU-HORHLVpRt54xvyWKdh9mJ3Pg06tDFqFw0X6xaVTQ20rA8zeUdX6ZS-BVtzc&deviceTypeId=3&language=en&loginId=api_test1&ma&password=111111&uid=578529ca22cab829.androidid&urlPath=fermi",
"protocol": "http",
"host": [
"localhost"
],
"port": "8080",
"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_test1"
},
{
"key": "ma",
"value": null
},
{
"key": "password",
"value": "111111"
},
{
"key": "uid",
"value": "578529ca22cab829.androidid"
},
{
"key": "urlPath",
"value": "fermi"
}
]
}
},
"response": []
}
],
"protocolProfileBehavior": {}
},
{
"name": "ChatAPI",
"item": [
{
"name": "userAction",
"event": [
{
"listen": "test",
"script": {
"id": "41fb3c92-8196-422a-a12a-39e36a1f5216",
"exec": [
"//成功確認コード\r",
"pm.test(\"Status code is 200\", function () {\r",
" pm.response.to.have.status(200);\r",
"});\r",
"\r",
"switch(pm.globals.get(\"cmd\")){\r",
" //JOIN_TEST\r",
" case pm.globals.get(\"JOIN\") : \r",
" //ユーザー情報確認\r",
" pm.test(\"test userInfo\", function () {\r",
" var jsonData = pm.response.json();\r",
" pm.expect(jsonData.body.userInfo.shopMemberId).to.eq(935)\r",
" pm.expect(jsonData.body.userInfo.shopId).to.eq(59)\r",
" });\r",
"\r",
" //ルーム情報\r",
" pm.test(\"test chatRoomCount\", function () {\r",
" var jsonData = pm.response.json().body.chatRoomList;\r",
" pm.expect(jsonData.length).to.eq(3)\r",
" });\r",
"\r",
" pm.test(\"test roomInfo\",function(){\r",
" var jsonData = pm.response.json().body.chatRoomList; \r",
" for(var i = 0; i < jsonData.length; i++){\r",
" switch(i){\r",
" case 0 :\r",
" pm.expect(jsonData[i].roomId).to.eq(98);\r",
" pm.expect(jsonData[i].roomName).to.eq(\"chatRoom1\");\r",
" pm.expect(jsonData[i].message).to.eq(\"こんばんは \");\r",
" pm.expect(jsonData[i].userCnt).to.eq(2);\r",
" break;\r",
"\r",
" case 1 :\r",
" pm.expect(jsonData[i].roomId).to.eq(99);\r",
" pm.expect(jsonData[i].roomName).to.eq(\"ChatRoom2\");\r",
" pm.expect(jsonData[i].message).to.eq(\"こんにちは \");\r",
" pm.expect(jsonData[i].userCnt).to.eq(2);\r",
" break;\r",
"\r",
" case 2 :\r",
" pm.expect(jsonData[i].roomId).to.eq(100);\r",
" pm.expect(jsonData[i].roomName).to.eq(\"ChatRoom3\");\r",
" pm.expect(jsonData[i].message).to.eq(\"おはようございます!! \");\r",
" pm.expect(jsonData[i].userCnt).to.eq(3);\r",
" break;\r",
" }\r",
" }\r",
" });\r",
" break;\r",
"\r",
"\r",
" //JOINROOM_TEST\r",
" case pm.globals.get(\"JOINROOM\") :\r",
"\r",
" pm.test(\"test userListBeforeExit\", function(){\r",
" var jsonData = pm.response.json();\r",
" var loginId = jsonData.body.userListBeforeExit;\r",
" \r",
" pm.expect(loginId.length).to.eq(2);\r",
" for(var i = 0; loginId.lenght; i ++){\r",
" switch(i){\r",
" case 0 : \r",
" pm.expect(loginId[i]).eq(\"api_test1\")\r",
" break;\r",
" case 1 : \r",
" pm.expect(loginId[i]).eq(\"api_test2\")\r",
" break;\r",
" }\r",
" }\r",
" })\r",
"\r",
" pm.test(\"test userListNewRoom\", function(){\r",
" var jsonData = pm.response.json();\r",
" var loginId = jsonData.body.userListNewRoom;\r",
" \r",
" pm.expect(loginId.length).to.eq(3);\r",
" for(var i = 0; loginId.lenght; i ++){\r",
" switch(i){\r",
" case 0 : \r",
" pm.expect(loginId[i]).eq(\"api_test1\")\r",
" break;\r",
" case 1 : \r",
" pm.expect(loginId[i]).eq(\"api_test2\")\r",
" break;\r",
" case 2 :\r",
" pm.expect(loginId[i]).eq(\"api_test3\")\r",
" }\r",
" }\r",
" })\r",
"\r",
" //メッセージリスト\r",
" pm.test(\"test messageList\", function(){\r",
" var jsonData = pm.response.json();\r",
" var message = jsonData.body.messageList;\r",
" pm.expect(message[0].messageId).to.eq(744)\r",
" pm.expect(message[0].message).to.eq(\"おはようございます!! \")\r",
" });\r",
"}\r",
"\r",
"\r",
"\r",
"\r",
""
],
"type": "text/javascript"
}
},
{
"listen": "prerequest",
"script": {
"id": "52a775f0-e5d4-4baa-a4e2-c590329d688d",
"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.test(\"cmd\",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(\"cmd\",map.get(\"cmd\"));\r",
"});\r",
""
],
"type": "text/javascript"
}
}
],
"protocolProfileBehavior": {
"disableBodyPruning": true,
"disabledSystemHeaders": {}
},
"request": {
"method": "GET",
"header": [
{
"key": "User-Agent",
"value": "Android",
"type": "text",
"disabled": true
}
],
"body": {
"mode": "raw",
"raw": "",
"options": {
"raw": {
"language": "javascript"
}
}
},
"url": {
"raw": "http://localhost:8080/acms/fermi/chatapi/user?sid=e923ade61074014edc3849bc7e69dca6&cmd=1",
"protocol": "http",
"host": [
"localhost"
],
"port": "8080",
"path": [
"acms",
"fermi",
"chatapi",
"user"
],
"query": [
{
"key": "sid",
"value": "e923ade61074014edc3849bc7e69dca6"
},
{
"key": "cmd",
"value": "1"
},
{
"key": "beforeRoomId",
"value": "99",
"disabled": true
},
{
"key": "loginIdList",
"value": null,
"disabled": true
},
{
"key": "groupId",
"value": null,
"disabled": true
},
{
"key": "newRoomName",
"value": "",
"disabled": true
},
{
"key": "newRoomId",
"value": "100",
"disabled": true
}
]
}
},
"response": []
},
{
"name": "roomAction",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": ""
}
},
"response": []
}
],
"protocolProfileBehavior": {}
}
],
"protocolProfileBehavior": {}
}
\ No newline at end of file
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