Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
zhangjingdong
/
bihe_interface_test
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a954fa91
authored
Jan 07, 2019
by
wangyuanfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试脚本
parent
97c02c93
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
187 additions
and
0 deletions
+187
-0
碧合app/张贴栏/张贴栏.postman_collection.json
+144
-0
碧合app/张贴栏/张贴栏_manage.postman_environment.json
+43
-0
No files found.
碧合app/张贴栏/张贴栏.postman_collection.json
0 → 100644
View file @
a954fa91
{
{
"info"
:
{
"_postman_id"
:
"8b65b444-52e4-44c0-b66f-10391013f540"
,
"name"
:
"张贴栏"
,
"schema"
:
"https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
},
"item"
:
[
{
"name"
:
"用户登录"
,
"event"
:
[
{
"listen"
:
"test"
,
"script"
:
{
"id"
:
"ab616fda-d96b-4f71-a9aa-6c59ce279e71"
,
"type"
:
"text/javascript"
,
"exec"
:
[
"// console.log(
\"
----------------responseBody--------------
\"
+responseBody);"
,
"var jsonData = JSON.parse(responseBody);"
,
"// console.log(
\"
----------------jsonData.data.accessToken--------------
\"
+jsonData.data.accessToken);"
,
""
,
"if(jsonData.data !== null || jsonData.data !==
\"\"
)"
,
"{"
,
" tests[
\"
accessToken
\"
] = true;"
,
" postman.setEnvironmentVariable(
\"
access-Token
\"
,jsonData.data.accessToken);"
,
" "
,
"}"
,
"else"
,
"{"
,
" console.log(
\"
接口返回错误:
\"
+jsonData.msg);"
,
" tests[
\"
accessToken
\"
]=false;"
,
"}"
,
""
]
}
}
],
"request"
:
{
"method"
:
"POST"
,
"header"
:
[
{
"key"
:
"Content-Type"
,
"value"
:
"application/json"
}
],
"body"
:
{
"mode"
:
"raw"
,
"raw"
:
"{
\n
\"
userPhone
\"
: {{user_phone}},
\n
\"
userPassword
\"
:
\"
123456
\"
,
\n
\"
equipment
\"
:
\"
c5d93c486a95d658
\"
,
\n
\"
channelId
\"
: 1
\n
}"
},
"url"
:
"{{gateway-user}}/app/login"
},
"response"
:
[]
},
{
"name"
:
"查看贴纸"
,
"event"
:
[
{
"listen"
:
"test"
,
"script"
:
{
"id"
:
"cf6abfe0-7743-4f8d-96d3-a1e9c77fdf7c"
,
"exec"
:
[
"var jsonData = JSON.parse(responseBody);"
,
"if(jsonData.code ===
\"
0
\"
)"
,
"{"
,
" tests[
\"
code
\"
] = true;"
,
"}"
,
"else{"
,
" console.log(
\"
接口返回错误:
\"
+jsonData.msg);"
,
" tests[
\"
code
\"
+jsonData.msg]=false;"
,
"}"
],
"type"
:
"text/javascript"
}
}
],
"request"
:
{
"method"
:
"POST"
,
"header"
:
[
{
"key"
:
"Content-Type"
,
"value"
:
"application/json"
,
"type"
:
"text"
},
{
"key"
:
"access-token"
,
"value"
:
"{{access-Token}}"
,
"type"
:
"text"
}
],
"body"
:
{
"mode"
:
"raw"
,
"raw"
:
""
},
"url"
:
"{{gateway-user}}/app/paste/{{townid}}"
},
"response"
:
[]
},
{
"name"
:
"添加贴纸"
,
"event"
:
[
{
"listen"
:
"test"
,
"script"
:
{
"id"
:
"50bcab4c-c214-49ef-b062-d0a08f75da74"
,
"exec"
:
[
"var jsonData = JSON.parse(responseBody);"
,
"if(jsonData.code ===
\"
0
\"
)"
,
"{"
,
" tests[
\"
code
\"
] = true;"
,
"}"
,
"else{"
,
" console.log(
\"
接口返回错误:
\"
+jsonData.msg);"
,
" tests[
\"
code
\"
+jsonData.msg]=false;"
,
"}"
],
"type"
:
"text/javascript"
}
}
],
"request"
:
{
"method"
:
"POST"
,
"header"
:
[
{
"key"
:
"Content-Type"
,
"value"
:
"application/json"
,
"type"
:
"text"
},
{
"key"
:
"access-token"
,
"value"
:
"{{access-Token}}"
,
"type"
:
"text"
}
],
"body"
:
{
"mode"
:
"raw"
,
"raw"
:
"{
\n\t\"
townId
\"
:1,
\n\t\"
pasteImg
\"
:
\"
aaa
\"
,
\n\t\"
pasteMessage
\"
:
\"
测试
\"\n
}"
},
"url"
:
"{{gateway-user}}/app/paste"
},
"response"
:
[]
}
]
}
\ No newline at end of file
碧合app/张贴栏/张贴栏_manage.postman_environment.json
0 → 100644
View file @
a954fa91
{
{
"id"
:
"377c6504-6548-4f83-89ee-ae47c9e5762d"
,
"name"
:
"张贴栏_manage"
,
"values"
:
[
{
"key"
:
"gateway-user"
,
"value"
:
"https://usergwtest.bgycc.com"
,
"description"
:
{
"content"
:
""
,
"type"
:
"text/plain"
},
"enabled"
:
true
},
{
"key"
:
"user_phone"
,
"value"
:
"13535593630"
,
"description"
:
{
"content"
:
""
,
"type"
:
"text/plain"
},
"enabled"
:
true
},
{
"key"
:
"access-Token"
,
"value"
:
"deed4e19687449e7852d850ca0bae660"
,
"enabled"
:
true
},
{
"key"
:
"townid"
,
"value"
:
"1"
,
"description"
:
{
"content"
:
""
,
"type"
:
"text/plain"
},
"enabled"
:
true
}
],
"_postman_variable_scope"
:
"environment"
,
"_postman_exported_at"
:
"2019-01-07T09:33:28.017Z"
,
"_postman_exported_using"
:
"Postman/6.5.2"
}
\ 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