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
ff582d34
Commit
ff582d34
authored
Jan 11, 2024
by
liguangyu06
Browse files
优化
parent
8fa1e69c
Changes
2
Hide whitespace changes
Inline
Side-by-side
air_case/cmdc_product/模糊查询仓库信息.air/模糊查询仓库信息.py
View file @
ff582d34
...
...
@@ -38,11 +38,19 @@ request_body = commonFuc().get_business_data(module, "payload22", stash_msg)
result
=
requests
.
get
(
url
,
params
=
request_body
,
headers
=
headers
)
result
=
json
.
loads
(
result
.
content
)
# print(result)
# 获取查询结果中stashCode
result
=
{
"stashCode"
:
result
[
"data"
][
0
][
"stashCode"
][:
1
]}
# 获取预期结果
check_dict
=
commonFuc
().
get_business_data
(
module
,
"checkDict22"
,
stash_msg
)
# print(check_dict)
# 断言实际结果中是否包含预期结果的内容
commonFuc
().
check_result
(
check_dict
,
result
)
# 增加判断登录失败情况
if
result
[
"success"
]:
# 获取查询结果中stashCode
result
=
{
"stashCode"
:
result
[
"data"
][
0
][
"stashCode"
][:
1
]}
# 获取预期结果
check_dict
=
commonFuc
().
get_business_data
(
module
,
"checkDict22"
,
stash_msg
)
# print(check_dict)
# 断言实际结果中是否包含预期结果的内容
commonFuc
().
check_result
(
check_dict
,
result
)
else
:
# 获取预期结果
check_dict
=
commonFuc
().
get_business_data
(
module
,
"payload_401"
)
# print(check_dict)
# 断言实际结果中是否包含预期结果的内容
commonFuc
().
check_result
(
check_dict
,
result
)
data/cmdc_product/data
View file @
ff582d34
...
...
@@ -24,6 +24,9 @@ json_headers1: {
"Sourcetype": "mall"
}
# 登录失败
"payload_401": {"code":"401","message":"Unauthorized","success":false}
#测试场景一:获取商品属性列表
"url1": "/product/productProperties/list"
"payload1": {"productCode":"","productName":"","specifications":"","materialCode":"","manufacturer":"","propertyName":"","propertyNote":"","propertyVal":"","createTimeStart":"","createTimeEnd":"","updateTimeEnd":"","updateTimeStart":"","times":null,"times2":null,"pageNumber":1,"pageSize":8}
...
...
@@ -529,8 +532,13 @@ checkDict72: {"productLineCode":"%s"}
#预期结果
checkDict73: {"success":true,"code":"200","message":"正在同步中","data":null,"freshToken":null}
#测试场景七十四:获取产品线制单员列表
"url74": "/user/queryMarkerList"
"payload74": {"productLineCode":"%s","realName":"","memberIdsList":[],"pageNumber":1,"pageSize":5}
#预期结果
checkDict74: {"success":true,"code":"200","message":"正在同步中","data":null,"freshToken":null}
# 查询已分配制单员的产品线信息
"payload74_1": {"productLineCode":null,"productLineName":null,"memberId":null,"isDistribution":1,"pageStart":1,"pageSize":10}
...
...
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