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
fd6eab48
Commit
fd6eab48
authored
Jun 05, 2024
by
liguangyu06
Browse files
用例优化
parent
5aa33877
Changes
2
Hide whitespace changes
Inline
Side-by-side
air_case/cmdc_32st/超发配置导出功能验证.air/超发配置导出功能验证.py
View file @
fd6eab48
...
...
@@ -38,7 +38,7 @@ strsQuery = result["data"]["list"][super_random]["productCode"]
# 第三步超发配置导出
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"url9"
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload9"
,
strsQuery
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload9"
)
"""
...
...
@@ -63,13 +63,13 @@ with open(file_path, 'wb') as f:
# 获取导出文件中商品编码
excel
=
HandleExcel
(
file_path
,
"Sheet1"
)
# print(excel.read_data())
result
=
{
"
strsQuery
"
:
excel
.
read_data
()[
0
].
get
(
"
商品
编码"
)}
result
=
{
"
materialCode
"
:
excel
.
read_data
()[
0
].
get
(
"
物料
编码"
)}
# 将接口响应时间添加至结果中
result
[
"api_time"
]
=
api_time
# 获取预期结果
check_dict
=
commonFuc
().
get_business_data
(
module
,
"checkDict9"
,
strsQuery
)
check_dict
=
commonFuc
().
get_business_data
(
module
,
"checkDict9"
)
# print(check_dict)
# 断言实际结果中是否包含预期结果的内容
commonFuc
().
check_result
(
check_dict
,
result
)
...
...
data/cmdc_32st/data
View file @
fd6eab48
...
...
@@ -93,9 +93,9 @@ checkDict8: {"strsQuery":"%s"}
#测试场景9:超发配置导出功能验证
"url9": "/order/public/exportstockPurchaseExcel"
"payload9": {"strsQuery":"
%s
","materialCode":"","productLineCode":""}
"payload9": {"strsQuery":"","materialCode":"
507677
","productLineCode":""}
#预期结果
checkDict9: {"
strsQuery":"%s
"}
checkDict9: {"
materialCode":"507677
"}
#测试场景13:超发配置导入日志记录验证
"url13": "/order/public/excelLog/list?sheetName=supernova-D&pageStart=1&pageSize=10&total="
...
...
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