Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
AbookCheck_communication_API_TEST
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Lee Daehyun
AbookCheck_communication_API_TEST
Commits
47c9a8e9
Commit
47c9a8e9
authored
Dec 10, 2020
by
Lee Daehyun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
API テスト実装_チャットルーム招待
parent
6fdc6526
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1905 additions
and
0 deletions
+1905
-0
20201210AbookCheck_communication.postman_collection.json
+1905
-0
No files found.
20201210AbookCheck_communication.postman_collection.json
0 → 100644
View file @
47c9a8e9
{
"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"
:
"COMMUNICATION_API構造"
,
"item"
:
[
{
"name"
:
"AppStoreNewLoginAction
\"
api_test1
\"
"
,
"event"
:
[
{
"listen"
:
"test"
,
"script"
:
{
"id"
:
"42eed0cf-da5a-4deb-980a-35f1164bbf57"
,
"exec"
:
[
"var sid = pm.response.json().sid;
\r
"
,
"pm.globals.set(
\"
sid
\"
,sid);"
],
"type"
:
"text/javascript"
}
},
{
"listen"
:
"prerequest"
,
"script"
:
{
"id"
:
"3a0ede3a-2473-4577-b99e-a598ab388241"
,
"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_test1&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_test1"
},
{
"key"
:
"ma"
,
"value"
:
null
},
{
"key"
:
"password"
,
"value"
:
"111111"
},
{
"key"
:
"uid"
,
"value"
:
"578529ca22cab829.androidid"
},
{
"key"
:
"urlPath"
,
"value"
:
"fermi"
}
]
}
},
"response"
:
[]
},
{
"name"
:
"AppStoreNewLoginAction
\"
api_test5
\"
"
,
"event"
:
[
{
"listen"
:
"test"
,
"script"
:
{
"id"
:
"ce77a107-85ca-4f59-b733-f64c2b3af6a1"
,
"exec"
:
[
"var sid = pm.response.json().sid;
\r
"
,
"pm.globals.set(
\"
sid
\"
,sid);"
],
"type"
:
"text/javascript"
}
}
],
"protocolProfileBehavior"
:
{
"disabledSystemHeaders"
:
{
"user-agent"
:
true
}
},
"request"
:
{
"method"
:
"POST"
,
"header"
:
[
{
"key"
:
"User-Agent"
,
"value"
:
"Android"
,
"type"
:
"text"
}
],
"url"
:
{
"raw"
:
"https://chatdev2.abook.bz/acms/nuabvapi/appStoreNewLogin?appId=3&appVersion=1.2.360&deviceToken=esSLc-NBwXc:APA91bFB13z_Zv7esMHAXwo5VvVZgETRLPqR4DvEyPtvCPNAw8ScCAfpiM53xos-PmOd98a-0eqvAN6rRIq1XaCBy64CXf-fQdNsW9yAE6F59RN57-l8Vk4utH1U0VPmIxWl3-0uw-er&deviceTypeId=3&language=en&loginId=api_test5&ma&password=111111&uid=3e40eb7cba223936.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"
:
"esSLc-NBwXc:APA91bFB13z_Zv7esMHAXwo5VvVZgETRLPqR4DvEyPtvCPNAw8ScCAfpiM53xos-PmOd98a-0eqvAN6rRIq1XaCBy64CXf-fQdNsW9yAE6F59RN57-l8Vk4utH1U0VPmIxWl3-0uw-er"
},
{
"key"
:
"deviceTypeId"
,
"value"
:
"3"
},
{
"key"
:
"language"
,
"value"
:
"en"
},
{
"key"
:
"loginId"
,
"value"
:
"api_test5"
},
{
"key"
:
"ma"
,
"value"
:
null
},
{
"key"
:
"password"
,
"value"
:
"111111"
},
{
"key"
:
"uid"
,
"value"
:
"3e40eb7cba223936.androidid"
},
{
"key"
:
"urlPath"
,
"value"
:
"fermi"
}
]
}
},
"response"
:
[]
},
{
"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(
\"
hello
\"
);
\r
"
,
" pm.expect(jsonData[i].userCnt).to.eq(2);
\r
"
,
" break;
\r
"
,
"
\r
"
,
" case 1 :
\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(
\"
good morning
\"
);
\r
"
,
" pm.expect(jsonData[i].userCnt).to.eq(3);
\r
"
,
" break;
\r
"
,
"
\r
"
,
" case 2 :
\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
"
,
" }
\r
"
,
" });
\r
"
,
" break;
\r
"
,
"
\r
"
,
"
\r
"
,
" //JOINROOM_TEST
\r
"
,
" case pm.globals.get(
\"
JOINROOM
\"
) :
\r
"
,
" //以前ルームのユーザーloginId
\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
"
,
" //参加するルームのユーザーloginId
\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
"
,
" break;
\r
"
,
"
\r
"
,
" case pm.globals.get(
\"
INVITEUSERS
\"
) :
\r
"
,
" break;
\r
"
,
"
\r
"
,
" //
\r
"
,
" case pm.globals.get(
\"
GETGROUPLIST
\"
) :
\r
"
,
" pm.test(
\"
test groupList
\"
, function(){
\r
"
,
" var jsonData = pm.response.json().body;
\r
"
,
" for(var i = 0; i < jsonData.groupList.length; i++){
\r
"
,
" switch(i){
\r
"
,
" case 0 :
\r
"
,
" pm.expect(jsonData.groupList[i].groupId).eq(1371);
\r
"
,
" pm.expect(jsonData.groupList[i].groupName).eq(
\"
全社
\"
);
\r
"
,
" pm.expect(jsonData.groupList[i].memberCnt).eq(1);
\r
"
,
" break;
\r
"
,
" case 1 :
\r
"
,
" pm.expect(jsonData.groupList[i].groupId).eq(1372);
\r
"
,
" pm.expect(jsonData.groupList[i].groupName).eq(
\"
A
\"
);
\r
"
,
" pm.expect(jsonData.groupList[i].memberCnt).eq(9);
\r
"
,
" break;
\r
"
,
" case 2 :
\r
"
,
" pm.expect(jsonData.groupList[i].groupId).eq(1373);
\r
"
,
" pm.expect(jsonData.groupList[i].groupName).eq(
\"
B
\"
);
\r
"
,
" pm.expect(jsonData.groupList[i].memberCnt).eq(3);
\r
"
,
" break;
\r
"
,
" case 3 :
\r
"
,
" pm.expect(jsonData.groupList[i].groupId).eq(1374);
\r
"
,
" pm.expect(jsonData.groupList[i].groupName).eq(
\"
C
\"
);
\r
"
,
" pm.expect(jsonData.groupList[i].memberCnt).eq(1);
\r
"
,
" break;
\r
"
,
" case 4 :
\r
"
,
" pm.expect(jsonData.groupList[i].groupId).eq(1408);
\r
"
,
" pm.expect(jsonData.groupList[i].groupName).eq(
\"
D
\"
);
\r
"
,
" pm.expect(jsonData.groupList[i].memberCnt).eq(1);
\r
"
,
" break;
\r
"
,
" case 5 :
\r
"
,
" pm.expect(jsonData.groupList[i].groupId).eq(1410);
\r
"
,
" pm.expect(jsonData.groupList[i].groupName).eq(
\"
Bのサブ
\"
);
\r
"
,
" pm.expect(jsonData.groupList[i].memberCnt).eq(1);
\r
"
,
" break;
\r
"
,
" }
\r
"
,
" break;
\r
"
,
" }
\r
"
,
" })
\r
"
,
" case pm.globals.get(
\"
GETUSERLISTINGROUP
\"
) :
\r
"
,
" pm.test(
\"
test userInfoInGroup
\"
,function() {
\r
"
,
" var jsonData = pm.response.json().body.groupUserList;
\r
"
,
" console.log(jsonData.length);
\r
"
,
" for (var i = 0; i < jsonData.length; i++) {
\r
"
,
" switch (i) {
\r
"
,
" case 0 :
\r
"
,
" pm.expect(jsonData[i].shopMemberId).eq(
\"
889
\"
)
\r
"
,
" pm.expect(jsonData[i].loginId).eq(
\"
fermi5
\"
)
\r
"
,
" //pm.expect(jsonData[i].timeStamp).eq(
\"
20201208105930
\"
)
\r
"
,
" pm.expect(jsonData[i].groupName).eq(
\"
B
\"
)
\r
"
,
" break;
\r
"
,
" case 1 :
\r
"
,
" pm.expect(jsonData[i].shopMemberId).eq(
\"
926
\"
)
\r
"
,
" pm.expect(jsonData[i].loginId).eq(
\"
kim-p1
\"
)
\r
"
,
" //pm.expect(jsonData[i].timeStamp).eq(0)
\r
"
,
" pm.expect(jsonData[i].groupName).eq(
\"
B
\"
)
\r
"
,
" break;
\r
"
,
" case 2 :
\r
"
,
" pm.expect(jsonData[i].shopMemberId).eq(
\"
929
\"
)
\r
"
,
" pm.expect(jsonData[i].loginId).eq(
\"
kimp1
\"
)
\r
"
,
" //pm.expect(jsonData[i].timeStamp).eq(
\"
20201130162142
\"
)
\r
"
,
" pm.expect(jsonData[i].groupName).eq(
\"
B
\"
)
\r
"
,
" break;
\r
"
,
" }
\r
"
,
" }
\r
"
,
" });
\r
"
,
"
\r
"
,
" break;
\r
"
,
"}
\r
"
,
""
],
"type"
:
"text/javascript"
}
},
{
"listen"
:
"prerequest"
,
"script"
:
{
"id"
:
"52a775f0-e5d4-4baa-a4e2-c590329d688d"
,
"exec"
:
[
"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"
:
{
"disabledSystemHeaders"
:
{}
},
"request"
:
{
"method"
:
"POST"
,
"header"
:
[
{
"key"
:
"User-Agent"
,
"value"
:
"Android"
,
"type"
:
"text"
,
"disabled"
:
true
}
],
"body"
:
{
"mode"
:
"raw"
,
"raw"
:
""
,
"options"
:
{
"raw"
:
{
"language"
:
"javascript"
}
}
},
"url"
:
{
"raw"
:
"https://chatdev2.abook.bz/acms/fermi/chatapi/user?groupId=1373&sid={{sid}}&cmd=4&newRoomId=100"
,
"protocol"
:
"https"
,
"host"
:
[
"chatdev2"
,
"abook"
,
"bz"
],
"path"
:
[
"acms"
,
"fermi"
,
"chatapi"
,
"user"
],
"query"
:
[
{
"key"
:
"beforeRoomId"
,
"value"
:
"99"
,
"disabled"
:
true
},
{
"key"
:
"loginIdList"
,
"value"
:
null
,
"disabled"
:
true
},
{
"key"
:
"groupId"
,
"value"
:
"1373"
},
{
"key"
:
"newRoomName"
,
"value"
:
""
,
"disabled"
:
true
},
{
"key"
:
"sid"
,
"value"
:
"{{sid}}"
},
{
"key"
:
"cmd"
,
"value"
:
"4"
},
{
"key"
:
"newRoomId"
,
"value"
:
"100"
}
]
}
},
"response"
:
[]
},
{
"name"
:
"roomAction"
,
"event"
:
[
{
"listen"
:
"prerequest"
,
"script"
:
{
"id"
:
"e9c615e6-f547-4d46-ae79-c939ad10c138"
,
"exec"
:
[
"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
"
,
" pm.globals.set(
\"
isOrberByUnread
\"
, map.get(
\"
isOrberByUnread
\"
))
\r
"
,
"});
\r
"
,
""
],
"type"
:
"text/javascript"
}
},
{
"listen"
:
"test"
,
"script"
:
{
"id"
:
"39225fb9-3620-4e53-ae56-a666c8183f06"
,
"exec"
:
[
"pm.test(
\"
Status code is 200
\"
, function () {
\r
"
,
" pm.response.to.have.status(200);
\r
"
,
"});
\r
"
,
"
\r
"
,
"switch(pm.globals.get(
\"
cmd
\"
)){
\r
"
,
" //該当ユーザのチャット一覧
\r
"
,
" case pm.globals.get(
\"
getRoomList
\"
) :
\r
"
,
" var jsonData = pm.response.json().body.roomList
\r
"
,
" var isOrberByUnread = pm.globals.get(
\"
isOrberByUnread
\"
)
\r
"
,
" pm.test(
\"
test getRoomList
\"
,function(){
\r
"
,
" //ルームの情報
\r
"
,
" pm.test(
\"
RoomList
\"
,function() {
\r
"
,
" //既読されてないルームが最初整列
\r
"
,
" if (isOrberByUnread ==
\"
true
\"
) {
\r
"
,
" for (var i = 0; i < jsonData.length; i++) {
\r
"
,
" switch(i) {
\r
"
,
" case 0 :
\r
"
,
" pm.expect(jsonData[i].roomId).eq(100)
\r
"
,
" pm.expect(jsonData[i].roomName).eq(
\"
ChatRoom3
\"
)
\r
"
,
" pm.expect(jsonData[i].message).eq(
\"
nice
\"
)
\r
"
,
" pm.expect(jsonData[i].userCnt).eq(3)
\r
"
,
" pm.expect(jsonData[i].unreadFirst).eq(2)
\r
"
,
" break;
\r
"
,
"
\r
"
,
" case 1 :
\r
"
,
" pm.expect(jsonData[i].roomId).eq(98)
\r
"
,
" pm.expect(jsonData[i].roomName).eq(
\"
chatRoom1
\"
)
\r
"
,
" pm.expect(jsonData[i].message).eq(
\"
hello
\"
)
\r
"
,
" pm.expect(jsonData[i].userCnt).eq(2)
\r
"
,
" pm.expect(jsonData[i].unreadFirst).eq(2)
\r
"
,
" break;
\r
"
,
"
\r
"
,
" case 2 :
\r
"
,
" pm.expect(jsonData[i].roomId).eq(99)
\r
"
,
" pm.expect(jsonData[i].roomName).eq(
\"
ChatRoom2
\"
)
\r
"
,
" pm.expect(jsonData[i].message).eq(
\"
こんにちは
\"
)
\r
"
,
" pm.expect(jsonData[i].userCnt).eq(2)
\r
"
,
" pm.expect(jsonData[i].unreadFirst).eq(2)
\r
"
,
" break;
\r
"
,
" }
\r
"
,
" }
\r
"
,
" //メッセージの送信時間順で整列
\r
"
,
" } else if (isOrberByUnread ==
\"
false
\"
) {
\r
"
,
" for (var i = 0; i < jsonData.length; i++) {
\r
"
,
" switch(i) {
\r
"
,
" case 0 :
\r
"
,
" pm.expect(jsonData[i].roomId).eq(100)
\r
"
,
" pm.expect(jsonData[i].roomName).eq(
\"
ChatRoom3
\"
)
\r
"
,
" pm.expect(jsonData[i].message).eq(
\"
nice
\"
)
\r
"
,
" pm.expect(jsonData[i].userCnt).eq(3)
\r
"
,
" break;
\r
"
,
"
\r
"
,
" case 1 :
\r
"
,
" pm.expect(jsonData[i].roomId).eq(98)
\r
"
,
" pm.expect(jsonData[i].roomName).eq(
\"
chatRoom1
\"
)
\r
"
,
" pm.expect(jsonData[i].message).eq(
\"
hello
\"
)
\r
"
,
" pm.expect(jsonData[i].userCnt).eq(2)
\r
"
,
" break;
\r
"
,
"
\r
"
,
" case 2 :
\r
"
,
" pm.expect(jsonData[i].roomId).eq(99)
\r
"
,
" pm.expect(jsonData[i].roomName).eq(
\"
ChatRoom2
\"
)
\r
"
,
" pm.expect(jsonData[i].message).eq(
\"
こんにちは
\"
)
\r
"
,
" pm.expect(jsonData[i].userCnt).eq(2)
\r
"
,
" break;
\r
"
,
" }
\r
"
,
" }
\r
"
,
" }
\r
"
,
" })
\r
"
,
" })
\r
"
,
" break;
\r
"
,
" case pm.globals.get(
\"
createNewRoom
\"
) :
\r
"
,
" break;
\r
"
,
" case pm.globals.get(
\"
exitRoom
\"
) :
\r
"
,
" break;
\r
"
,
"
\r
"
,
" case pm.globals.get(
\"
disconnect
\"
) :
\r
"
,
" var jsonData = pm.response.json().body.userList;
\r
"
,
" pm.test(
\"
test userList
\"
, function(){
\r
"
,
" for (var i = 0; i < jsonData.length; i++){
\r
"
,
" switch (i) {
\r
"
,
" case 0 :
\r
"
,
" pm.expect(jsonData[i].loginId).eq(
\"
api_test1
\"
)
\r
"
,
" pm.expect(jsonData[i].imageClearFlg).eq(0)
\r
"
,
" pm.expect(jsonData[i].shopMemberId).eq(935)
\r
"
,
" break;
\r
"
,
" case 1 :
\r
"
,
" pm.expect(jsonData[i].loginId).eq(
\"
api_test2
\"
)
\r
"
,
" pm.expect(jsonData[i].imageClearFlg).eq(0)
\r
"
,
" pm.expect(jsonData[i].shopMemberId).eq(936)
\r
"
,
" break;
\r
"
,
" case 2 :
\r
"
,
" pm.expect(jsonData[i].loginId).eq(
\"
api_test3
\"
)
\r
"
,
" pm.expect(jsonData[i].imageClearFlg).eq(0)
\r
"
,
" pm.expect(jsonData[i].shopMemberId).eq(937)
\r
"
,
" break;
\r
"
,
" }
\r
"
,
" }
\r
"
,
" })
\r
"
,
" break;
\r
"
,
"}"
],
"type"
:
"text/javascript"
}
}
],
"request"
:
{
"method"
:
"POST"
,
"header"
:
[],
"url"
:
{
"raw"
:
"https://chatdev2.abook.bz/acms/fermi/chatapi/room?sid={{sid}}&cmd=1&isOrberByUnread=false"
,
"protocol"
:
"https"
,
"host"
:
[
"chatdev2"
,
"abook"
,
"bz"
],
"path"
:
[
"acms"
,
"fermi"
,
"chatapi"
,
"room"
],
"query"
:
[
{
"key"
:
"sid"
,
"value"
:
"{{sid}}"
},
{
"key"
:
"cmd"
,
"value"
:
"1"
},
{
"key"
:
"isOrberByUnread"
,
"value"
:
"false"
},
{
"key"
:
"loginIdList"
,
"value"
:
null
,
"disabled"
:
true
},
{
"key"
:
"newRoomName"
,
"value"
:
null
,
"disabled"
:
true
},
{
"key"
:
"roomId"
,
"value"
:
"100"
,
"disabled"
:
true
}
]
}
},
"response"
:
[]
},
{
"name"
:
"messageAction"
,
"event"
:
[
{
"listen"
:
"prerequest"
,
"script"
:
{
"id"
:
"645c2387-8265-47f3-90fa-e8934d78b2d3"
,
"exec"
:
[
"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"
}
},
{
"listen"
:
"test"
,
"script"
:
{
"id"
:
"0025f620-8347-4888-8d01-0b9fa63e11f7"
,
"exec"
:
[
"pm.test(
\"
Status code is 200
\"
, function () {
\r
"
,
" pm.response.to.have.status(200);
\r
"
,
"});
\r
"
,
"
\r
"
,
"switch (pm.globals.get(
\"
cmd
\"
)) {
\r
"
,
" case pm.globals.get(
\"
createMessage
\"
) :
\r
"
,
" break;
\r
"
,
" case pm.globals.get(
\"
getMessages
\"
) :
\r
"
,
" pm.test(
\"
test getMessages
\"
, function(){
\r
"
,
" var jsonData = pm.response.json().body;
\r
"
,
" pm.test(
\"
messageList
\"
, function(){
\r
"
,
" for (var i = 0; i < jsonData.messageList.length; i++) {
\r
"
,
" switch (i) {
\r
"
,
" case 0 :
\r
"
,
" pm.expect(jsonData.messageList[i].message).eq(
\"
Hello
\"
)
\r
"
,
" pm.expect(jsonData.messageList[i].shopId).eq(59)
\r
"
,
" pm.expect(jsonData.messageList[i].loginId).eq(
\"
api_test2
\"
)
\r
"
,
" pm.expect(jsonData.messageList[i].shopMemberId).eq(936)
\r
"
,
" break;
\r
"
,
"
\r
"
,
" case 1 :
\r
"
,
" pm.expect(jsonData.messageList[i].message).eq(
\"
こんばんは
\"
)
\r
"
,
" pm.expect(jsonData.messageList[i].shopId).eq(59)
\r
"
,
" pm.expect(jsonData.messageList[i].loginId).eq(
\"
api_test1
\"
)
\r
"
,
" pm.expect(jsonData.messageList[i].shopMemberId).eq(935)
\r
"
,
" break;
\r
"
,
" }
\r
"
,
" }
\r
"
,
" })
\r
"
,
" pm.test(
\"
userList
\"
, function(){
\r
"
,
" for (var i = 0; i < jsonData.userList.length; i++) {
\r
"
,
" switch (i) {
\r
"
,
" case 0:
\r
"
,
" pm.expect(jsonData.userList[i].loginId).eq(
\"
api_test1
\"
)
\r
"
,
" pm.expect(jsonData.userList[i].shopMemberId).eq(
\"
935
\"
)
\r
"
,
" break;
\r
"
,
"
\r
"
,
" case 1:
\r
"
,
" pm.expect(jsonData.userList[i].loginId).eq(
\"
api_test2
\"
)
\r
"
,
" pm.expect(jsonData.userList[i].shopMemberId).eq(
\"
936
\"
)
\r
"
,
" break;
\r
"
,
"
\r
"
,
" }
\r
"
,
" }
\r
"
,
" })
\r
"
,
" })
\r
"
,
" break;
\r
"
,
" case pm.globals.get(
\"
roomSearch
\"
) :
\r
"
,
" pm.test(
\"
test roomSearch
\"
, function(){
\r
"
,
" var jsonData = pm.response.json().body;
\r
"
,
" pm.test(
\"
searchResultList
\"
, function(){
\r
"
,
" for (var i = 0; i < jsonData.searchResultList; i++){
\r
"
,
" switch (i) {
\r
"
,
" case 0 :
\r
"
,
" pm.expect(jsonData[i].message).eq(2)
\r
"
,
" pm.expect(jsonData[i].roomName).eq(
\"
chatRoom1
\"
)
\r
"
,
" pm.expect(jsonData[i].roomId).eq(98)
\r
"
,
" break;
\r
"
,
" }
\r
"
,
" }
\r
"
,
"
\r
"
,
" })
\r
"
,
" })
\r
"
,
" break;
\r
"
,
"}"
],
"type"
:
"text/javascript"
}
}
],
"request"
:
{
"method"
:
"POST"
,
"header"
:
[],
"url"
:
{
"raw"
:
"https://chatdev2.abook.bz/acms/fermi/chatapi/message?sid={{sid}}&cmd=1&message=nice&roomId=100&userListInRoom=935,936,937&imageFlag=0"
,
"protocol"
:
"https"
,
"host"
:
[
"chatdev2"
,
"abook"
,
"bz"
],
"path"
:
[
"acms"
,
"fermi"
,
"chatapi"
,
"message"
],
"query"
:
[
{
"key"
:
"sid"
,
"value"
:
"{{sid}}"
},
{
"key"
:
"cmd"
,
"value"
:
"1"
},
{
"key"
:
"message"
,
"value"
:
"nice"
},
{
"key"
:
"roomId"
,
"value"
:
"100"
},
{
"key"
:
"userListInRoom"
,
"value"
:
"935,936,937"
},
{
"key"
:
"lineNum"
,
"value"
:
"0"
,
"disabled"
:
true
},
{
"key"
:
"keyword"
,
"value"
:
"h"
,
"disabled"
:
true
},
{
"key"
:
"imageFlag"
,
"value"
:
"0"
}
]
}
},
"response"
:
[]
}
],
"protocolProfileBehavior"
:
{}
},
{
"name"
:
"ChatAPI"
,
"item"
:
[
{
"name"
:
"CreateNewRoomAPI「チャットルーム生成」"
,
"item"
:
[
{
"name"
:
"AppStoreNewLoginAction
\"
api_test1
\"
"
,
"event"
:
[
{
"listen"
:
"test"
,
"script"
:
{
"id"
:
"bb19329e-f423-4bef-a6b4-28557f22c94f"
,
"exec"
:
[
"var sid = pm.response.json().sid;
\r
"
,
"pm.globals.set(
\"
sid
\"
,sid);"
],
"type"
:
"text/javascript"
}
},
{
"listen"
:
"prerequest"
,
"script"
:
{
"id"
:
"424ae95b-535c-4920-8c73-159dd8f5f654"
,
"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_test1&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_test1"
},
{
"key"
:
"ma"
,
"value"
:
null
},
{
"key"
:
"password"
,
"value"
:
"111111"
},
{
"key"
:
"uid"
,
"value"
:
"578529ca22cab829.androidid"
},
{
"key"
:
"urlPath"
,
"value"
:
"fermi"
}
]
}
},
"response"
:
[]
},
{
"name"
:
"createNewRoom"
,
"event"
:
[
{
"listen"
:
"prerequest"
,
"script"
:
{
"id"
:
"c10792df-ffaf-4ade-99ed-e5124daa29d3"
,
"exec"
:
[
"pm.test(
\"
url 変数習得
\"
,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
"
,
" var shopMemberId = map.get(
\"
loginIdList
\"
).split(
\"
,
\"
);
\r
"
,
" for (var i = 0; i < shopMemberId.length; i++) {
\r
"
,
" pm.globals.set(
\"
shopMemberId
\"
+i ,shopMemberId[i]);
\r
"
,
" }
\r
"
,
"});"
],
"type"
:
"text/javascript"
}
},
{
"listen"
:
"test"
,
"script"
:
{
"id"
:
"abd98cc2-215b-4229-ba61-67559e44f016"
,
"exec"
:
[
"pm.test(
\"
Status code is 200
\"
, function () {
\r
"
,
" pm.response.to.have.status(200);
\r
"
,
"});
\r
"
,
"pm.test(
\"
test createNewRoom
\"
, function() {
\r
"
,
" pm.test(
\"
userList
\"
, function() {
\r
"
,
" var roomId = pm.response.json().body.roomId;
\r
"
,
" pm.globals.set(
\"
NewroomId
\"
, roomId)
\r
"
,
" })
\r
"
,
"})"
],
"type"
:
"text/javascript"
}
}
],
"request"
:
{
"method"
:
"POST"
,
"header"
:
[],
"url"
:
{
"raw"
:
"http://localhost:8080/acms/fermi/chatapi/room?sid={{sid}}&cmd={{createNewRoom}}&loginIdList=936&newRoomName=testRoom"
,
"protocol"
:
"http"
,
"host"
:
[
"localhost"
],
"port"
:
"8080"
,
"path"
:
[
"acms"
,
"fermi"
,
"chatapi"
,
"room"
],
"query"
:
[
{
"key"
:
"sid"
,
"value"
:
"{{sid}}"
},
{
"key"
:
"cmd"
,
"value"
:
"{{createNewRoom}}"
},
{
"key"
:
"loginIdList"
,
"value"
:
"936"
},
{
"key"
:
"newRoomName"
,
"value"
:
"testRoom"
}
]
}
},
"response"
:
[]
},
{
"name"
:
"Join"
,
"event"
:
[
{
"listen"
:
"test"
,
"script"
:
{
"id"
:
"a5093004-aa59-4ce7-92d8-0f8a5b2ce849"
,
"exec"
:
[
"pm.test(
\"
Status code is 200
\"
, function () {
\r
"
,
" pm.response.to.have.status(200);
\r
"
,
"});
\r
"
,
"
\r
"
,
"pm.test(
\"
新しいルーム生成確認テスト
\"
, function(){
\r
"
,
" var isNewRoom = false;
\r
"
,
" var chatRoomList = pm.response.json().body.chatRoomList;
\r
"
,
" for (var i =0 ; i < chatRoomList.length; i++){
\r
"
,
" if (chatRoomList[i].roomId == pm.globals.get(
\"
NewroomId
\"
)) {
\r
"
,
" isNewRoom = true;
\r
"
,
" break;
\r
"
,
" }
\r
"
,
" }
\r
"
,
" pm.expect(isNewRoom).eq(true)
\r
"
,
"})
\r
"
,
" "
],
"type"
:
"text/javascript"
}
}
],
"request"
:
{
"method"
:
"POST"
,
"header"
:
[],
"url"
:
{
"raw"
:
"https://chatdev2.abook.bz/acms/fermi/chatapi/user?sid={{sid}}&cmd=1"
,
"protocol"
:
"https"
,
"host"
:
[
"chatdev2"
,
"abook"
,
"bz"
],
"path"
:
[
"acms"
,
"fermi"
,
"chatapi"
,
"user"
],
"query"
:
[
{
"key"
:
"sid"
,
"value"
:
"{{sid}}"
},
{
"key"
:
"cmd"
,
"value"
:
"1"
}
]
}
},
"response"
:
[]
}
],
"protocolProfileBehavior"
:
{},
"_postman_isSubFolder"
:
true
},
{
"name"
:
"InviteUsersAPI「招待技能」"
,
"item"
:
[
{
"name"
:
"Login「api_test1」"
,
"event"
:
[
{
"listen"
:
"test"
,
"script"
:
{
"id"
:
"f3285ac4-caee-4a31-aee7-a1ef99703401"
,
"exec"
:
[
"var sid = pm.response.json().sid;
\r
"
,
"pm.globals.set(
\"
sid
\"
,sid);"
],
"type"
:
"text/javascript"
}
},
{
"listen"
:
"prerequest"
,
"script"
:
{
"id"
:
"db26bea8-6047-4661-8f97-f66aaee9556d"
,
"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"
,
"value"
:
"Android"
,
"type"
:
"text"
}
],
"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_test1&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_test1"
},
{
"key"
:
"ma"
,
"value"
:
null
},
{
"key"
:
"password"
,
"value"
:
"111111"
},
{
"key"
:
"uid"
,
"value"
:
"578529ca22cab829.androidid"
},
{
"key"
:
"urlPath"
,
"value"
:
"fermi"
}
]
}
},
"response"
:
[]
},
{
"name"
:
"joinRoom"
,
"event"
:
[
{
"listen"
:
"test"
,
"script"
:
{
"id"
:
"ef5f8e8a-b564-4e82-a60d-5ee4dad610a7"
,
"exec"
:
[
"pm.test(
\"
Status code is 200
\"
, function () {
\r
"
,
" pm.response.to.have.status(200);
\r
"
,
"});
\r
"
,
"
\r
"
,
"var beforeMessagList = pm.response.json().body.messageList;
\r
"
,
"pm.globals.set(
\"
beforeMessagList
\"
, beforeMessagList)
\r
"
,
"
\r
"
,
"
\r
"
,
""
],
"type"
:
"text/javascript"
}
},
{
"listen"
:
"prerequest"
,
"script"
:
{
"id"
:
"cb5a92d5-28e1-4b5c-be48-fde2cc093016"
,
"exec"
:
[
"pm.test(
\"
リクエスト newRoomId 設定
\"
,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(
\"
newRoomId
\"
,map.get(
\"
newRoomId
\"
));
\r
"
,
" pm.globals.set(
\"
beforeRoomId
\"
,map.get(
\"
beforeRoomId
\"
));
\r
"
,
"});
\r
"
,
""
],
"type"
:
"text/javascript"
}
}
],
"request"
:
{
"method"
:
"POST"
,
"header"
:
[],
"url"
:
{
"raw"
:
"https://chatdev2.abook.bz/acms/fermi/chatapi/user?sid={{sid}}&cmd={{JOINROOM}}&newRoomId=115&beforeRoomId=100"
,
"protocol"
:
"https"
,
"host"
:
[
"chatdev2"
,
"abook"
,
"bz"
],
"path"
:
[
"acms"
,
"fermi"
,
"chatapi"
,
"user"
],
"query"
:
[
{
"key"
:
"sid"
,
"value"
:
"{{sid}}"
},
{
"key"
:
"cmd"
,
"value"
:
"{{JOINROOM}}"
},
{
"key"
:
"newRoomId"
,
"value"
:
"115"
},
{
"key"
:
"beforeRoomId"
,
"value"
:
"100"
}
]
}
},
"response"
:
[]
},
{
"name"
:
"setGroupList"
,
"event"
:
[
{
"listen"
:
"test"
,
"script"
:
{
"id"
:
"ed446c1e-431f-4890-bd0b-37c1a0998c6e"
,
"exec"
:
[
"pm.test(
\"
Status code is 200
\"
, function () {
\r
"
,
" pm.response.to.have.status(200);
\r
"
,
"});
\r
"
,
"
\r
"
,
"var groupList = pm.response.json().body.groupList
\r
"
,
"pm.globals.set(
\"
groupList
\"
, groupList)"
],
"type"
:
"text/javascript"
}
}
],
"request"
:
{
"method"
:
"GET"
,
"header"
:
[],
"url"
:
{
"raw"
:
"https://chatdev2.abook.bz/acms/fermi/chatapi/user?sid={{sid}}&cmd={{GETGROUPLIST}}&newRoomId={{newRoomId}}"
,
"protocol"
:
"https"
,
"host"
:
[
"chatdev2"
,
"abook"
,
"bz"
],
"path"
:
[
"acms"
,
"fermi"
,
"chatapi"
,
"user"
],
"query"
:
[
{
"key"
:
"sid"
,
"value"
:
"{{sid}}"
},
{
"key"
:
"cmd"
,
"value"
:
"{{GETGROUPLIST}}"
},
{
"key"
:
"newRoomId"
,
"value"
:
"{{newRoomId}}"
}
]
}
},
"response"
:
[]
},
{
"name"
:
"getUserListInGroup"
,
"event"
:
[
{
"listen"
:
"test"
,
"script"
:
{
"id"
:
"8247f4fb-36d8-4305-86dc-d258b7df9e33"
,
"exec"
:
[
"pm.test(
\"
Status code is 200
\"
, function () {
\r
"
,
" pm.response.to.have.status(200);
\r
"
,
"});
\r
"
,
"var groupUserList = pm.response.json().body.groupUserList;
\r
"
,
"pm.globals.set(
\"
groupUserList
\"
, groupUserList);
\r
"
,
""
],
"type"
:
"text/javascript"
}
},
{
"listen"
:
"prerequest"
,
"script"
:
{
"id"
:
"4a2a6cfe-0665-4a98-867a-9ec0b6b7c6c7"
,
"exec"
:
[
"pm.test(
\"
リクエスト groupId 設定
\"
,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(
\"
groupId
\"
,map.get(
\"
groupId
\"
));
\r
"
,
"});"
],
"type"
:
"text/javascript"
}
}
],
"request"
:
{
"method"
:
"GET"
,
"header"
:
[],
"url"
:
{
"raw"
:
"https://chatdev2.abook.bz/acms/fermi/chatapi/user?sid={{sid}}&cmd={{GETUSERLISTINGROUP}}&newRoomId={{newRoomId}}&groupId=1413"
,
"protocol"
:
"https"
,
"host"
:
[
"chatdev2"
,
"abook"
,
"bz"
],
"path"
:
[
"acms"
,
"fermi"
,
"chatapi"
,
"user"
],
"query"
:
[
{
"key"
:
"sid"
,
"value"
:
"{{sid}}"
},
{
"key"
:
"cmd"
,
"value"
:
"{{GETUSERLISTINGROUP}}"
},
{
"key"
:
"newRoomId"
,
"value"
:
"{{newRoomId}}"
},
{
"key"
:
"groupId"
,
"value"
:
"1413"
}
]
}
},
"response"
:
[]
},
{
"name"
:
"inviteUsers"
,
"event"
:
[
{
"listen"
:
"test"
,
"script"
:
{
"id"
:
"e9f4e954-0a6e-4538-941c-ca15d75c3d8e"
,
"exec"
:
[
"pm.test(
\"
Status code is 200
\"
, function () {
\r
"
,
" pm.response.to.have.status(200);
\r
"
,
"});
\r
"
,
"
\r
"
,
"var userList = pm.response.json().body.userList;
\r
"
,
"pm.globals.set(
\"
userList
\"
,userList);"
],
"type"
:
"text/javascript"
}
},
{
"listen"
:
"prerequest"
,
"script"
:
{
"id"
:
"6c21eced-aa06-49d5-bfd4-65adb972e642"
,
"exec"
:
[
""
],
"type"
:
"text/javascript"
}
}
],
"request"
:
{
"method"
:
"POST"
,
"header"
:
[],
"url"
:
{
"raw"
:
"http://localhost:8080/acms/fermi/chatapi/user?sid={{sid}}&cmd={{INVITEUSERS}}&newRoomId={{newRoomId}}&newRoomName=testRoom&loginIdList=941"
,
"protocol"
:
"http"
,
"host"
:
[
"localhost"
],
"port"
:
"8080"
,
"path"
:
[
"acms"
,
"fermi"
,
"chatapi"
,
"user"
],
"query"
:
[
{
"key"
:
"sid"
,
"value"
:
"{{sid}}"
},
{
"key"
:
"cmd"
,
"value"
:
"{{INVITEUSERS}}"
},
{
"key"
:
"newRoomId"
,
"value"
:
"{{newRoomId}}"
},
{
"key"
:
"newRoomName"
,
"value"
:
"testRoom"
},
{
"key"
:
"loginIdList"
,
"value"
:
"941"
}
]
}
},
"response"
:
[]
},
{
"name"
:
"Confirm_joinRoom"
,
"event"
:
[
{
"listen"
:
"test"
,
"script"
:
{
"id"
:
"4b7d7b36-26a2-4d52-b55e-21179c20a6df"
,
"exec"
:
[
"pm.test(
\"
Status code is 200
\"
, function () {
\r
"
,
" pm.response.to.have.status(200);
\r
"
,
"});
\r
"
,
"
\r
"
,
"pm.test(
\"
test joinRoom
\"
, function () {
\r
"
,
" var afterMessageList = pm.response.json().body.messageList;
\r
"
,
" var beforeMessagList = pm.globals.get(
\"
beforeMessagList
\"
);
\r
"
,
"
\r
"
,
" pm.test(
\"
招待後メッセージ一致確認
\"
, function () {
\r
"
,
" for (var i = 0; i < afterMessageList.length; i++) {
\r
"
,
" pm.expect(afterMessageList[i].message).eq(beforeMessagList[i].message)
\r
"
,
" pm.expect(afterMessageList[i].shopMemberId).eq(beforeMessagList[i].shopMemberId)
\r
"
,
" pm.expect(afterMessageList[i].loginId).eq(beforeMessagList[i].loginId)
\r
"
,
" }
\r
"
,
" })
\r
"
,
"
\r
"
,
" pm.test(
\"
招待したユーザーがチャットルームに参加している確認
\"
, function () {
\r
"
,
" var inviteUserList = pm.globals.get(
\"
userList
\"
);
\r
"
,
" var roomUserList = pm.response.json().body.userListNewRoom;
\r
"
,
" for (var i = 0; i < roomUserList.length; i++) {
\r
"
,
" pm.expect(roomUserList[i]).eq(inviteUserList[i])
\r
"
,
" }
\r
"
,
" })
\r
"
,
"})
\r
"
,
"
\r
"
,
"
\r
"
,
""
],
"type"
:
"text/javascript"
}
},
{
"listen"
:
"prerequest"
,
"script"
:
{
"id"
:
"4d3e225d-2a45-4d3f-90c6-c1335289682d"
,
"exec"
:
[
""
],
"type"
:
"text/javascript"
}
}
],
"request"
:
{
"method"
:
"POST"
,
"header"
:
[],
"url"
:
{
"raw"
:
"https://chatdev2.abook.bz/acms/fermi/chatapi/user?sid={{sid}}&cmd={{JOINROOM}}&newRoomId={{newRoomId}}&beforeRoomId={{beforeRoomId}}"
,
"protocol"
:
"https"
,
"host"
:
[
"chatdev2"
,
"abook"
,
"bz"
],
"path"
:
[
"acms"
,
"fermi"
,
"chatapi"
,
"user"
],
"query"
:
[
{
"key"
:
"sid"
,
"value"
:
"{{sid}}"
},
{
"key"
:
"cmd"
,
"value"
:
"{{JOINROOM}}"
},
{
"key"
:
"newRoomId"
,
"value"
:
"{{newRoomId}}"
},
{
"key"
:
"beforeRoomId"
,
"value"
:
"{{beforeRoomId}}"
}
]
}
},
"response"
:
[]
},
{
"name"
:
"Confirm_getGroupList"
,
"event"
:
[
{
"listen"
:
"test"
,
"script"
:
{
"id"
:
"a477e860-7f07-42e0-808d-5c02921dd958"
,
"exec"
:
[
"pm.test(
\"
Status code is 200
\"
, function () {
\r
"
,
" pm.response.to.have.status(200);
\r
"
,
"});
\r
"
,
"
\r
"
,
"pm.test(
\"
招待したユーザーの属しているグループカウンターが減っているか確認
\"
, function () {
\r
"
,
" var beforeGroupList = pm.globals.get(
\"
groupList
\"
);
\r
"
,
" var afterGroupList = pm.response.json().body.groupList;
\r
"
,
"
\r
"
,
" //変更があるグループ変数
\r
"
,
" //var inviteGroupInfo = Array();
\r
"
,
"
\r
"
,
" //変更があるか判断する変数
\r
"
,
" var isGetGroupListCheck = false;
\r
"
,
"
\r
"
,
" //招待前後を比較し、変更した判断
\r
"
,
" for (var i = 0; i < afterGroupList.length; i++) {
\r
"
,
" if (beforeGroupList[i].memberCnt != afterGroupList[i].memberCnt){
\r
"
,
" isGetGroupListCheck = true;
\r
"
,
" //inviteGroupInfo = afterGroupList[i];
\r
"
,
" }
\r
"
,
" }
\r
"
,
" pm.expect(isGetGroupListCheck).eq(true)
\r
"
,
"})
\r
"
,
""
],
"type"
:
"text/javascript"
}
}
],
"request"
:
{
"method"
:
"GET"
,
"header"
:
[],
"url"
:
{
"raw"
:
"https://chatdev2.abook.bz/acms/fermi/chatapi/user?sid={{sid}}&cmd={{GETGROUPLIST}}&newRoomId={{newRoomId}}"
,
"protocol"
:
"https"
,
"host"
:
[
"chatdev2"
,
"abook"
,
"bz"
],
"path"
:
[
"acms"
,
"fermi"
,
"chatapi"
,
"user"
],
"query"
:
[
{
"key"
:
"sid"
,
"value"
:
"{{sid}}"
},
{
"key"
:
"cmd"
,
"value"
:
"{{GETGROUPLIST}}"
},
{
"key"
:
"newRoomId"
,
"value"
:
"{{newRoomId}}"
}
]
}
},
"response"
:
[]
},
{
"name"
:
"Confirm_getUserListInGroup"
,
"event"
:
[
{
"listen"
:
"test"
,
"script"
:
{
"id"
:
"25aeea64-f25f-475d-bf80-0f0d8742a8f6"
,
"exec"
:
[
"pm.test(
\"
Status code is 200
\"
, function () {
\r
"
,
" pm.response.to.have.status(200);
\r
"
,
"});
\r
"
,
"
\r
"
,
"var beforeGroupUserList = pm.globals.get(
\"
groupUserList
\"
);
\r
"
,
"var afterGrouptUserList = pm.response.json().body.groupUserList;
\r
"
,
"
\r
"
,
"pm.test(
\"
招待されたユーザーがグループに属してないか判断
\"
, function () {
\r
"
,
" var isGetUserListInGroupCheck = -1;
\r
"
,
"
\r
"
,
" //招待後shopMemberIdを配列に格納
\r
"
,
" var afterShopMemberIds = Array();
\r
"
,
" for (var i = 0; i < afterGrouptUserList.length; i++) {
\r
"
,
" afterShopMemberIds[i] = afterGrouptUserList[i].shopMemberId;
\r
"
,
" }
\r
"
,
" //招待前後を比較し、招待したユーザーのshopMemberIdを格納
\r
"
,
" var shopMemberId = new Array();
\r
"
,
" for (var i = 0; i < beforeGroupUserList.length; i++) {
\r
"
,
" var count = 0;
\r
"
,
" for (var j = 0 ; j < afterShopMemberIds.length; j++){
\r
"
,
" if (beforeGroupUserList[i].shopMemberId == afterShopMemberIds[j]) {
\r
"
,
" count++;
\r
"
,
" }
\r
"
,
" }
\r
"
,
" if(count == 0){
\r
"
,
" shopMemberId.push(beforeGroupUserList[i].shopMemberId);
\r
"
,
" }
\r
"
,
" }
\r
"
,
"
\r
"
,
" //招待後ユーザーshopMemberIdがないのを確認
\r
"
,
" for (var i = 0; i < shopMemberId.length; i++) {
\r
"
,
" pm.expect(isGetUserListInGroupCheck).eq(afterShopMemberIds.indexOf(shopMemberId[i]))
\r
"
,
" }
\r
"
,
" }) "
],
"type"
:
"text/javascript"
}
}
],
"request"
:
{
"method"
:
"GET"
,
"header"
:
[],
"url"
:
{
"raw"
:
"https://chatdev2.abook.bz/acms/fermi/chatapi/user?sid={{sid}}&cmd={{GETUSERLISTINGROUP}}&newRoomId={{newRoomId}}&groupId={{groupId}}"
,
"protocol"
:
"https"
,
"host"
:
[
"chatdev2"
,
"abook"
,
"bz"
],
"path"
:
[
"acms"
,
"fermi"
,
"chatapi"
,
"user"
],
"query"
:
[
{
"key"
:
"sid"
,
"value"
:
"{{sid}}"
},
{
"key"
:
"cmd"
,
"value"
:
"{{GETUSERLISTINGROUP}}"
},
{
"key"
:
"newRoomId"
,
"value"
:
"{{newRoomId}}"
},
{
"key"
:
"groupId"
,
"value"
:
"{{groupId}}"
}
]
}
},
"response"
:
[]
}
],
"protocolProfileBehavior"
:
{},
"_postman_isSubFolder"
:
true
},
{
"name"
:
"ExitRoomAPI「ルーム脱退技能」"
,
"item"
:
[
{
"name"
:
"AppStoreNewLoginAction
\"
api_test5
\"
"
,
"event"
:
[
{
"listen"
:
"test"
,
"script"
:
{
"id"
:
"56a79d01-e28c-4824-ba50-ab5ab21f311c"
,
"exec"
:
[
"var sid = pm.response.json().sid;
\r
"
,
"pm.globals.set(
\"
sid
\"
,sid);"
],
"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=esSLc-NBwXc:APA91bFB13z_Zv7esMHAXwo5VvVZgETRLPqR4DvEyPtvCPNAw8ScCAfpiM53xos-PmOd98a-0eqvAN6rRIq1XaCBy64CXf-fQdNsW9yAE6F59RN57-l8Vk4utH1U0VPmIxWl3-0uw-er&deviceTypeId=3&language=en&loginId=api_test5&ma&password=111111&uid=3e40eb7cba223936.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"
:
"esSLc-NBwXc:APA91bFB13z_Zv7esMHAXwo5VvVZgETRLPqR4DvEyPtvCPNAw8ScCAfpiM53xos-PmOd98a-0eqvAN6rRIq1XaCBy64CXf-fQdNsW9yAE6F59RN57-l8Vk4utH1U0VPmIxWl3-0uw-er"
},
{
"key"
:
"deviceTypeId"
,
"value"
:
"3"
},
{
"key"
:
"language"
,
"value"
:
"en"
},
{
"key"
:
"loginId"
,
"value"
:
"api_test5"
},
{
"key"
:
"ma"
,
"value"
:
null
},
{
"key"
:
"password"
,
"value"
:
"111111"
},
{
"key"
:
"uid"
,
"value"
:
"3e40eb7cba223936.androidid"
},
{
"key"
:
"urlPath"
,
"value"
:
"fermi"
}
]
}
},
"response"
:
[]
},
{
"name"
:
"exitRoom"
,
"event"
:
[
{
"listen"
:
"test"
,
"script"
:
{
"id"
:
"e549a9cb-eda0-4cc4-a67e-c340da4c5bf1"
,
"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/room?sid={{sid}}&cmd=3&roomId=115"
,
"protocol"
:
"https"
,
"host"
:
[
"chatdev2"
,
"abook"
,
"bz"
],
"path"
:
[
"acms"
,
"fermi"
,
"chatapi"
,
"room"
],
"query"
:
[
{
"key"
:
"sid"
,
"value"
:
"{{sid}}"
},
{
"key"
:
"cmd"
,
"value"
:
"3"
},
{
"key"
:
"roomId"
,
"value"
:
"115"
}
]
}
},
"response"
:
[]
}
],
"protocolProfileBehavior"
:
{},
"_postman_isSubFolder"
:
true
}
],
"protocolProfileBehavior"
:
{}
}
],
"protocolProfileBehavior"
:
{}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment