Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mayi_request_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
陈海枫
mayi_request_test
Commits
a72c4534
Commit
a72c4534
authored
Mar 01, 2023
by
jianing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
111
parent
1fab8707
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
100 deletions
+0
-100
小工蚁正式环境接口.postman_collection.json
+0
-100
No files found.
小工蚁正式环境接口.postman_collection.json
deleted
100644 → 0
View file @
1fab8707
{
{
"info"
:
{
"_postman_id"
:
"11c2452a-d7c9-42eb-9f90-c88fe6e2ac3d"
,
"name"
:
"小工蚁正式环境接口"
,
"schema"
:
"https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item"
:
[
{
"name"
:
"登录"
,
"item"
:
[
{
"name"
:
"登录"
,
"event"
:
[
{
"listen"
:
"test"
,
"script"
:
{
"exec"
:
[
"pm.test(
\"
Status code is 200
\"
, function () {
\r
"
,
" pm.response.to.have.status(200);
\r
"
,
"});
\r
"
,
"//判断响应代码是否为200
\r
"
,
"
\r
"
,
"pm.test(
\"
登录成功断言
\"
,function(){pm.expect(pm.response.text()).to.include(
\"
请求成功
\"
)})
\r
"
,
"//判断响应结果中是否包含请求成功
\r
"
,
"
\r
"
,
"pm.test(
\"
响应状态码是否成功
\"
, function () {
\r
"
,
" pm.expect(pm.response.code).to.be.oneOf([200, 202,201]);
\r
"
,
"});
\r
"
,
"//判断响应状态码是否在里面
\r
"
,
"
\r
"
,
"pm.test(
\"
Content-Type is present
\"
, function () {
\r
"
,
" pm.response.to.have.header(
\"
Content-Type
\"
);
\r
"
,
"});
\r
"
,
"//判断响应头是否包含
\r
"
,
"
\r
"
,
"
\r
"
,
"var jsonData =JSON.parse(responseBody);//获取body中返回的所有参数
\r
"
,
"pm.globals.set(
\"
Token
\"
, jsonData.data.token);//把返回参数中的keys设置为环境变量"
],
"type"
:
"text/javascript"
}
}
],
"request"
:
{
"method"
:
"POST"
,
"header"
:
[
{
"key"
:
"Connection"
,
"value"
:
"keep-alive"
,
"type"
:
"text"
},
{
"key"
:
"token"
,
"value"
:
"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJuYmYiOjE2NzI3MzgzNTUsInVzZXJEYXRhIjp7InVzZXJDb2RlIjoiU0wyMjEwMjdYTEc4M0siLCJuaWNrTmFtZSI6IuWGsOeOiSIsInVuaW9uSWQiOiJvdllwcnQ3TUhCbFd5UzV1M0tvMlJtTjNSZG9zIiwibW9iaWxlIjoiMTg4MzgxNjYxNDIiLCJhdmF0YXJVcmwiOiJodHRwczovL3NtYXJ0LWxhYi10ZXN0LWltZy5vc3MtY24tc2hhbmdoYWkuYWxpeXVuY3MuY29tL3NvdXJjZXMvc21hcnQvdXNlckhlYWQvU0wyMjEwMjdYTEc4M0svMjAyMjExMTMvMTY2ODMyNTUxOTIxNy5qcGc_eC1vc3MtcHJvY2Vzcz1pbWFnZS9yZXNpemUsbV9maWxsLHdfNjAwLGhfNjAwIiwic3RhdHVzIjoxLCJjaXR5Q29kZSI6IjAyMSIsInNpdGVDb2RlIjoiZGVmYXVsdCIsInJlZ1RpbWUiOjE2NjY4NTEwNTYsInNlc3Npb25LZXkiOiJTeUt2VHpNNW81L09RM2Q3MlRyOFhRPT0iLCJpc0FncmVlbWVudCI6MSwiYWdyZWVtZW50VGltZSI6MTY3MTE3NDUzMH0sImV4cCI6MTY3Mjc2NzE1NSwiaWF0IjoxNjcyNzM4MzU1fQ.vcFpZSKx2Qm7fU77ZHYTIfS2mSlyr8LafryzIBPDmlw"
,
"type"
:
"text"
},
{
"key"
:
"content-type"
,
"value"
:
"application/json;charset=UTF-8"
,
"type"
:
"text"
},
{
"key"
:
"User-Agent"
,
"value"
:
"Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1 wechatdevtools/1.06.2209190 MicroMessenger/8.0.5 Language/zh_CN webview/"
,
"type"
:
"text"
}
],
"body"
:
{
"mode"
:
"raw"
,
"raw"
:
"{
\r\n
\"
username
\"
:
\"
17394636990@mayi888.com
\"
,
\r\n
\"
password
\"
:
\"
123456
\"
,
\r\n
\"
loginType
\"
: 1
\r\n
}"
,
"options"
:
{
"raw"
:
{
"language"
:
"json"
}
}
},
"url"
:
{
"raw"
:
"https://admin.mayi888.com/innerApi/baseService/employeeInfo/loginByRole"
,
"protocol"
:
"https"
,
"host"
:
[
"admin"
,
"mayi888"
,
"com"
],
"path"
:
[
"innerApi"
,
"baseService"
,
"employeeInfo"
,
"loginByRole"
]
}
},
"response"
:
[]
}
]
}
]
}
\ 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