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
bf9fa052
Commit
bf9fa052
authored
Jun 05, 2024
by
liguangyu06
Browse files
用例优化
parent
b5041abc
Changes
1
Hide whitespace changes
Inline
Side-by-side
air_case/cmdc_32st/列表查询条件验证_超发记录.air/列表查询条件验证_超发记录.py
View file @
bf9fa052
...
...
@@ -32,18 +32,22 @@ result = json.loads(result.content)
# 生成随机数
flow_random
=
random
.
randint
(
0
,
len
(
result
[
"data"
][
"list"
])
-
1
)
# 获取超发记录信息
custData
=
result
[
"data"
][
"list"
][
flow_random
][
"customerCode"
]
productData
=
result
[
"data"
][
"list"
][
flow_random
][
"productName"
]
demandCode
=
result
[
"data"
][
"list"
][
flow_random
][
"demandCode"
]
distributionCode
=
result
[
"data"
][
"list"
][
flow_random
][
"distributionCode"
]
startTime
=
result
[
"data"
][
"list"
][
flow_random
][
"createTime"
][:
10
]
+
" 00:00:00"
endTime
=
str
(
datetime
.
datetime
.
now
().
strftime
(
"%Y-%m-%d"
))
+
" 00:00:00"
custData
=
(
result
[
"data"
][
"list"
][
flow_random
][
"customerCode"
]
if
result
[
"data"
][
"list"
][
flow_random
][
"customerCode"
]
else
""
)
productData
=
(
result
[
"data"
][
"list"
][
flow_random
][
"productName"
]
if
result
[
"data"
][
"list"
][
flow_random
][
"productName"
]
else
""
)
demandCode
=
(
result
[
"data"
][
"list"
][
flow_random
][
"demandCode"
]
if
result
[
"data"
][
"list"
][
flow_random
][
"demandCode"
]
else
""
)
distributionCode
=
(
result
[
"data"
][
"list"
][
flow_random
][
"distributionCode"
]
if
result
[
"data"
][
"list"
][
flow_random
][
"distributionCode"
]
else
""
)
startTime
=
""
endTime
=
""
# 第三步进行列表查询条件验证
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"url15"
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload15"
,
custData
,
productData
,
demandCode
,
distributionCode
,
startTime
,
endTime
)
# print(request_body)
"""
场景: 列表查询条件验证_超发记录
...
...
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