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
5706a140
Commit
5706a140
authored
Nov 17, 2023
by
liguangyu06
Browse files
用例优化
parent
199ac144
Changes
2
Hide whitespace changes
Inline
Side-by-side
air_case/cmdc_rebate/客户发放返利编辑功能验证.air/客户发放返利编辑功能验证.py
View file @
5706a140
...
@@ -28,7 +28,7 @@ request_body = commonFuc().get_business_data(module, "payload5")
...
@@ -28,7 +28,7 @@ request_body = commonFuc().get_business_data(module, "payload5")
# 发送请求
# 发送请求
result
=
requests
.
post
(
url
,
json
=
request_body
,
headers
=
headers
)
result
=
requests
.
post
(
url
,
json
=
request_body
,
headers
=
headers
)
result
=
json
.
loads
(
result
.
content
)
result
=
json
.
loads
(
result
.
content
)
print
(
result
)
# 获取客户发放返利信息
# 获取客户发放返利信息
customer_code
=
result
[
"data"
][
"list"
][
0
][
"customerCode"
]
customer_code
=
result
[
"data"
][
"list"
][
0
][
"customerCode"
]
rebate_id
=
result
[
"data"
][
"list"
][
0
][
"rebateId"
]
rebate_id
=
result
[
"data"
][
"list"
][
0
][
"rebateId"
]
...
@@ -36,7 +36,7 @@ amount = random.randint(1, 10000)
...
@@ -36,7 +36,7 @@ amount = random.randint(1, 10000)
# 第三步进行返利编辑
# 第三步进行返利编辑
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"url30"
)
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"url30"
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload
6
"
,
rebate_id
,
amount
,
customer_code
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload
30
"
,
rebate_id
,
amount
,
customer_code
)
"""
"""
场景: 客户发放返利编辑功能验证
场景: 客户发放返利编辑功能验证
...
...
data/cmdc_rebate/data
View file @
5706a140
...
@@ -231,13 +231,13 @@ checkDict29: {"success":true,"code":"200","message":"OK"}
...
@@ -231,13 +231,13 @@ checkDict29: {"success":true,"code":"200","message":"OK"}
#测试场景三十一:客户发放返利新增验证
#测试场景三十一:客户发放返利新增验证
"url30": "/order/rebateOperaSku/addRebateSku"
"url30": "/order/rebateOperaSku/addRebateSku"
"payload30": {"rebateid":"%s","transactiontype":"
3
","transactionamount":"%s","rebateValidity":
null,"rebateStartTime":null,"customercode":"%s","effectivetype":0,"note":"添加返利新增验证"
}
"payload30": {"rebateid":"%s","transactiontype":"
1
","transactionamount":"%s","rebateValidity":
"2023-11-29T16:00:00.000Z","rebateStartTime":"2023-11-16T16:00:00.000Z","customercode":"%s","note":"返利编辑验证","effectivetype":null
}
#预期结果
#预期结果
checkDict30: {"success":true,"code":"200"}
checkDict30: {"success":true,"code":"200"}
#测试场景三十二:客户发放返利编辑功能验证
#测试场景三十二:客户发放返利编辑功能验证
同上
#
同上
...
...
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