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
0a1c3826
Commit
0a1c3826
authored
Apr 08, 2024
by
liguangyu06
Browse files
优化
parent
90828884
Changes
1
Hide whitespace changes
Inline
Side-by-side
air_case/cmdc_rebate/返利发放明细获取验证.air/返利发放明细获取验证.py
View file @
0a1c3826
...
@@ -36,8 +36,10 @@ request_body = commonFuc().get_business_data(module, "payload33")
...
@@ -36,8 +36,10 @@ request_body = commonFuc().get_business_data(module, "payload33")
result
=
requests
.
post
(
url
,
json
=
request_body
,
headers
=
headers
)
result
=
requests
.
post
(
url
,
json
=
request_body
,
headers
=
headers
)
# 获取接口响应时间
# 获取接口响应时间
api_time
=
float
(
result
.
elapsed
.
total_seconds
())
api_time
=
float
(
result
.
elapsed
.
total_seconds
())
result
=
json
.
loads
(
result
.
content
)
# 将接口响应时间添加至result
result
=
json
.
loads
(
result
.
content
)
result
[
"api_time"
]
=
api_time
# print(result)
# print(result)
# 获取预期结果
# 获取预期结果
check_dict
=
commonFuc
().
get_business_data
(
module
,
"checkDict33"
)
check_dict
=
commonFuc
().
get_business_data
(
module
,
"checkDict33"
)
...
@@ -55,7 +57,7 @@ host, port, user, pwd = mysql_handle.getConf(db="cmdc_db")
...
@@ -55,7 +57,7 @@ host, port, user, pwd = mysql_handle.getConf(db="cmdc_db")
# 数据库查询返利发放规则状态
# 数据库查询返利发放规则状态
sql
=
"SELECT t.rebateTripId FROM `cmdc-order`.tc_rebatetrip t"
sql
=
"SELECT t.rebateTripId FROM `cmdc-order`.tc_rebatetrip t"
result
=
{
"total"
:
len
(
mysql_handle
.
selectSql
(
host
,
port
,
user
,
pwd
,
"cmdc-order"
,
sql
))}
result
=
{
"total"
:
len
(
mysql_handle
.
selectSql
(
host
,
port
,
user
,
pwd
,
"cmdc-order"
,
sql
))}
result
[
"api_time"
]
=
api_time
# print(result)
# print(result)
# 获取预期结果
# 获取预期结果
check_dict
=
commonFuc
().
get_business_data
(
module
,
"checkDict33_1"
,
total
)
check_dict
=
commonFuc
().
get_business_data
(
module
,
"checkDict33_1"
,
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