Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
test
autotest-airtest-web-cmdc
Commits
160b4276
Commit
160b4276
authored
Sep 21, 2023
by
liguangyu06
Browse files
增加用户信息查询接口
parent
1b5c340b
Changes
3
Hide whitespace changes
Inline
Side-by-side
air_case/cmdc_userinfo_query/用户信息查询.air/用户信息查询.py
0 → 100644
View file @
160b4276
# -*- encoding=utf8 -*-
__author__
=
"liguangyu"
"""
case_tag:api,cmdc用户信息查询,2252,2252-1,sit,bs
主数据平台:多彩商城用户信息查询接口
"""
from
common.common_func
import
commonFuc
from
air_case.cmdc_login.多彩商城登录.多彩商城登录
import
CmdcMaiiLogin
import
requests
import
json
module
=
"cmdc_userinfo_query"
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"url1"
)
print
(
url
)
# 获取登录所需账号密码
username
=
commonFuc
().
get_business_data
(
module
,
"username"
)
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
# 获取登录后Cmdc_access_token
cmdc_access_token
=
CmdcMaiiLogin
(
username
,
password
).
get_token
()
print
(
cmdc_access_token
)
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers"
,
cmdc_access_token
)
print
(
headers
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload1"
)
print
(
request_body
)
"""
场景:用户信息查询
用例名称:用户信息查询
输出:{"success":true,"code":"200","message":"OK"}
"""
# 发送请求
result
=
requests
.
get
(
url
,
headers
=
headers
)
result
=
json
.
loads
(
result
.
content
)
print
(
result
)
# 获取预期结果
check_dict
=
commonFuc
().
get_business_data
(
module
,
"checkDict1"
)
print
(
check_dict
)
# 断言实际结果中是否包含预期结果的内容
commonFuc
().
check_result
(
check_dict
,
result
)
data/cmdc_product_list_query/data
View file @
160b4276
...
@@ -14,3 +14,8 @@ json_headers: {
...
@@ -14,3 +14,8 @@ json_headers: {
checkDict1: {"success":true,"code":"200","message":"OK"}
checkDict1: {"success":true,"code":"200","message":"OK"}
#获取客户列表接口地址
"url2": "/user/querySubCustomerPage"
"payload2": {"disableSign":0,"status":3,"telephone":"","userNo":"","userName":"","customerCompanyName":"","pageSize":10,"pageStart":1,"total":0}
#预期结果
checkDict2: {"success":true,"code":"200","message":"OK"}
\ No newline at end of file
data/cmdc_userinfo_query/data
0 → 100644
View file @
160b4276
# 多彩商城登录信息
"username": "Test001"
"password": "Aa123456"
json_headers: {
"Cmdc_access_token": "%s",
"Sourcetype": "mall"
}
#获取站点信息接口地址
"url1": "/user/mall/queryUserInfo"
"payload1": {}
#预期结果
checkDict1: {"success":true,"code":"200","message":"OK"}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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