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
d8809a1b
Commit
d8809a1b
authored
Jun 14, 2024
by
liguangyu06
Browse files
用例优化
parent
e5896a33
Changes
2
Hide whitespace changes
Inline
Side-by-side
air_case/cmdc_special_version/植入上报附件下载功能验证.air/植入上报附件下载功能验证.py
View file @
d8809a1b
...
...
@@ -43,7 +43,7 @@ result = json.loads(result.content)
# print(result)
# 生成随机数
report_random
=
random
.
randint
(
0
,
len
(
result
[
"data"
][
"list"
])
-
1
)
report_random
=
0
# 获取上报植入信息
reportId
=
result
[
"data"
][
"list"
][
report_random
][
"reportId"
]
batchNumber
=
result
[
"data"
][
"list"
][
report_random
][
"batchNumber"
]
...
...
@@ -66,7 +66,7 @@ api_time = float(result.elapsed.total_seconds())
# 获取植入附件下载状态
result
=
json
.
loads
(
result
.
content
)
#
print(result)
print
(
result
)
# 增加判断,审核不通过的不支持附件下载
if
result
[
"success"
]:
result
=
{
"status"
:
result
[
"data"
][
"status"
]}
...
...
@@ -83,7 +83,7 @@ else:
result
[
"api_time"
]
=
api_time
# 获取预期结果
check_dict
=
commonFuc
().
get_business_data
(
module
,
"checkDict35_
1
"
,
batchNumber
)
check_dict
=
commonFuc
().
get_business_data
(
module
,
"checkDict35_
2
"
,
batchNumber
)
# print(check_dict)
# 断言实际结果中是否包含预期结果的内容
commonFuc
().
check_result
(
check_dict
,
result
)
data/cmdc_special_version/data
View file @
d8809a1b
...
...
@@ -284,6 +284,7 @@ checkDict34: {"batchNumber":"%s"}
#预期结果
checkDict35: {"status":1}
checkDict35_1: {"success":false,"code":"ERROR","message":"1个生产批号不可下载,请重新选择:%s"}
checkDict35_2: {"success":false,"code":"ERROR","message":"id不存在"}
#测试场景36:获取植入上报附件下载日志
"url36": "/product/zipFileInfo/list"
...
...
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