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
cd4773b3
Commit
cd4773b3
authored
Apr 24, 2024
by
liguangyu06
Browse files
优化
parent
c3799494
Changes
2
Hide whitespace changes
Inline
Side-by-side
air_case/cmdc_special_version/产品线已存在_植入产品线新增.air/产品线已存在_植入产品线新增.py
View file @
cd4773b3
...
...
@@ -14,8 +14,8 @@ import json
module
=
"cmdc_special_version"
# 第一步登录后台运营系统获取token
username
=
commonFuc
().
get_business_data
(
module
,
"username_
do_be
"
)
password
=
commonFuc
().
get_business_data
(
module
,
"password_
do_be
"
)
username
=
commonFuc
().
get_business_data
(
module
,
"username_
admin2
"
)
password
=
commonFuc
().
get_business_data
(
module
,
"password_
admin2
"
)
# 获取登录后Cmdc_access_token
cmdc_access_token
=
CmdcDoLogin
(
username
,
password
).
get_token
()
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers"
,
cmdc_access_token
)
...
...
@@ -30,10 +30,12 @@ result = json.loads(result.content)
# 获取产品线信息
productLineCode
=
result
[
"data"
][
"list"
][
0
][
"productLineCode"
]
productLineName
=
result
[
"data"
][
"list"
][
0
][
"productLineName"
]
numberSource
=
result
[
"data"
][
"list"
][
0
][
"numberSource"
]
soStartTimeStr
=
result
[
"data"
][
"list"
][
0
][
"soStartTimeStr"
]
# 第三步植入产品线新增
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"url47"
)
request_body
=
[
commonFuc
().
get_business_data
(
module
,
"payload47"
,
productLineCode
,
productLineName
)]
request_body
=
[
commonFuc
().
get_business_data
(
module
,
"payload47"
,
productLineCode
,
productLineName
,
numberSource
,
soStartTimeStr
)]
"""
...
...
@@ -60,4 +62,3 @@ check_dict = commonFuc().get_business_data(module, "checkDict47", productLineNam
# print(check_dict)
# 断言实际结果中是否包含预期结果的内容
commonFuc
().
check_result
(
check_dict
,
result
)
data/cmdc_special_version/data
View file @
cd4773b3
...
...
@@ -310,7 +310,7 @@ checkDict46: {"success":true,"code":"200","message":"OK","data":{"errList":["产
#测试场景47:产品线已存在_植入产品线新增
"url47": "/order/public/batchReportProductline"
"payload47": {"productLineCode":"%s","productLineName":"%s","numberSource":
2
,"soStartTimeStr":
null
,"status":0}
"payload47": {"productLineCode":"%s","productLineName":"%s","numberSource":
"%s"
,"soStartTimeStr":
"%s"
,"status":0}
#预期结果
checkDict47: {"errList":"产品线:%s已存在,无法添加"}
...
...
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