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
ec0ac742
Commit
ec0ac742
authored
Jan 23, 2024
by
liguangyu06
Browse files
优化
parent
7cc3581e
Changes
1
Hide whitespace changes
Inline
Side-by-side
air_case/cmdc_order_merge/模糊查询客户信息.air/模糊查询客户信息.py
→
air_case/cmdc_order_merge/模糊查询客户信息
_配货单列表
.air/模糊查询客户信息
_配货单列表
.py
View file @
ec0ac742
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
__author__
=
"liguangyu"
__author__
=
"liguangyu"
"""
"""
case_tag:cmdc_api,cmdc模糊查询客户信息,2290,2250-03,sit,bs
case_tag:cmdc_api,cmdc模糊查询客户信息
_配货单列表
,2290,2250-03,sit,bs
主数据平台:运营后台管理系统查询客户信息接口
主数据平台:运营后台管理系统查询客户信息接口
"""
"""
...
@@ -30,7 +30,7 @@ request_body = commonFuc().get_business_data(module, "payload2", customer_random
...
@@ -30,7 +30,7 @@ request_body = commonFuc().get_business_data(module, "payload2", customer_random
"""
"""
场景: 验证模糊查询客户信息接口连通性
场景: 验证模糊查询客户信息接口连通性
用例名称:模糊查询客户信息
用例名称:模糊查询客户信息
_配货单列表
输出:{"cusCompanyName":"%s"}
输出:{"cusCompanyName":"%s"}
"""
"""
# 发送请求
# 发送请求
...
@@ -38,13 +38,13 @@ result = requests.get(url, params=request_body, headers=headers)
...
@@ -38,13 +38,13 @@ result = requests.get(url, params=request_body, headers=headers)
# 获取接口响应时间
# 获取接口响应时间
api_time
=
float
(
result
.
elapsed
.
total_seconds
())
api_time
=
float
(
result
.
elapsed
.
total_seconds
())
result
=
json
.
loads
(
result
.
content
)
result
=
json
.
loads
(
result
.
content
)
# print(result)
# 获取客户信息中cusCompanyName
# 获取客户信息中cusCompanyName
result
=
{
"cusCompanyName"
:
result
[
"data"
][
0
][
"cusCompanyName"
][:
2
]}
result
=
{
"cusCompanyName"
:
result
[
"data"
][
0
][
"cusCompanyName"
][:
2
]}
result
[
"api_time"
]
=
api_time
result
[
"api_time"
]
=
api_time
print
(
result
)
# 获取预期结果
# 获取预期结果
check_dict
=
commonFuc
().
get_business_data
(
module
,
"checkDict2"
,
customer_random
)
check_dict
=
commonFuc
().
get_business_data
(
module
,
"checkDict2"
,
customer_random
)
#
print(check_dict)
print
(
check_dict
)
# 断言实际结果中是否包含预期结果的内容
# 断言实际结果中是否包含预期结果的内容
commonFuc
().
check_result
(
check_dict
,
result
)
commonFuc
().
check_result
(
check_dict
,
result
)
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