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
58eb0321
Commit
58eb0321
authored
Apr 28, 2024
by
liguangyu06
Browse files
优化
parent
2db417b4
Changes
2
Hide whitespace changes
Inline
Side-by-side
air_case/cmdc_special_version/批次号无效_通过批号获取上报数据.air/批次号无效_通过批号获取上报数据.py
View file @
58eb0321
...
...
@@ -43,7 +43,7 @@ request_body = commonFuc().get_business_data(module, "payload63", batchNumber, c
场景: 批次号无效_通过批号获取上报数据
用例名称:批次号无效_通过批号获取上报数据
输出:{"
errList":"客户编码:%s
生产批号:%s不存在或已上报"}
输出:{"
message":"
生产批号:%s
不存在或已上报"}
"""
# 发送请求
...
...
@@ -51,14 +51,12 @@ result = requests.post(url, json=request_body, headers=headers)
# 获取接口响应时间
api_time
=
float
(
result
.
elapsed
.
total_seconds
())
# 获取接口返回信息
result
=
json
.
loads
(
result
.
content
)
result
=
{
"errList"
:
result
[
"data"
][
"errList"
][
0
]}
# 将接口响应时间添加至result
result
=
json
.
loads
(
result
.
content
)
result
[
"api_time"
]
=
api_time
# 获取预期结果
check_dict
=
commonFuc
().
get_business_data
(
module
,
"checkDict63
"
,
customerCode
,
batchNumber
)
check_dict
=
commonFuc
().
get_business_data
(
module
,
"checkDict63
_1"
,
batchNumber
)
# print(check_dict)
# 断言实际结果中是否包含预期结果的内容
commonFuc
().
check_result
(
check_dict
,
result
)
data/cmdc_special_version/data
View file @
58eb0321
...
...
@@ -429,6 +429,7 @@ checkDict64: {"success":false,"code":"ERROR","message":"第1行上报植入数
"payload63": {"productLineCode":"","reportVoExcelList":[{"batchNumber":"%s","customerCode":"%s"}]}
#预期结果
checkDict63: {"errList":"客户编码:%s生产批号:%s不存在或已上报"}
checkDict63_1: {"message":"生产批号:%s 不存在或已上报"}
#测试场景65:通过批次号获取上报数据验证
"url65": "/order/public/getBackReport"
...
...
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