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-spd
Commits
810d60e8
Commit
810d60e8
authored
Mar 11, 2024
by
xiao-hesheng
Browse files
新增采购计划模块脚本
parent
30096eba
Changes
2
Hide whitespace changes
Inline
Side-by-side
air_case/b3_herp3_purchase/a_a7_手工采购计划_添加产品页面_列表查询_条件查询_模糊查询.air/a_a7_手工采购计划_添加产品页面_列表查询_条件查询_模糊查询.py
View file @
810d60e8
...
@@ -17,8 +17,8 @@ import sys
...
@@ -17,8 +17,8 @@ import sys
def
test1
():
def
test1
():
module
=
"b3_herp3_purchase"
module
=
"b3_herp3_purchase"
"""
"""
场景:a_a
6
_手工采购计划_添加产品页面_列表查询_条件查询_
精确
查询
场景:a_a
7
_手工采购计划_添加产品页面_列表查询_条件查询_
模糊
查询
用例名称:a_a
6
_手工采购计划_添加产品页面_列表查询_条件查询_
精确
查询
用例名称:a_a
7
_手工采购计划_添加产品页面_列表查询_条件查询_
模糊
查询
输入:无
输入:无
输出:"rtn_msg": {"code": 0, "msg": null, "data": true}
输出:"rtn_msg": {"code": 0, "msg": null, "data": true}
"""
"""
...
@@ -43,7 +43,7 @@ def test1():
...
@@ -43,7 +43,7 @@ def test1():
# date2=timeUtils().get_time_add(-1)
# date2=timeUtils().get_time_add(-1)
# print(date1,date2)
# print(date1,date2)
# # 请求体
# # 请求体
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload_
6
"
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload_
5_1
"
)
# 发送请求
# 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'result'
,
result
)
print
(
'result'
,
result
)
...
@@ -56,5 +56,61 @@ def test1():
...
@@ -56,5 +56,61 @@ def test1():
else
:
else
:
commonFuc
().
check_text_exist
(
'error'
,
result
)
commonFuc
().
check_text_exist
(
'error'
,
result
)
# 按器械注册人模糊查询
str
=
commonFuc
().
get_business_data
(
module
,
'data4'
)
list2
=
list
(
str
.
split
(
","
))
print
(
'list2'
,
list2
)
for
i
in
list2
:
# # 请求体
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload_6_1"
,
i
)
print
(
'request_body'
,
request_body
)
# 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'result'
,
result
)
# 断言
code
=
commonFuc
().
analysis_json
(
'code'
,
result
)
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
total
=
commonFuc
().
analysis_json
(
'total'
,
data
)
if
code
==
0
and
len
(
data
)
>=
1
and
total
>=
1
:
commonFuc
().
check_text_exist
(
0
,
result
)
else
:
commonFuc
().
check_text_exist
(
'error'
,
result
)
#按产品名称/编号/简称模糊查询
str
=
commonFuc
().
get_business_data
(
module
,
'data5'
)
list2
=
list
(
str
.
split
(
","
))
print
(
'list2'
,
list2
)
for
i
in
list2
:
# # 请求体
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload_8_1"
,
i
)
print
(
'request_body'
,
request_body
)
# 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'result'
,
result
)
# 断言
code
=
commonFuc
().
analysis_json
(
'code'
,
result
)
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
total
=
commonFuc
().
analysis_json
(
'total'
,
data
)
if
code
==
0
and
len
(
data
)
>=
1
and
total
>=
1
:
commonFuc
().
check_text_exist
(
0
,
result
)
else
:
commonFuc
().
check_text_exist
(
'error'
,
result
)
#按进院供应商模糊查询
str
=
commonFuc
().
get_business_data
(
module
,
'data4'
)
list2
=
list
(
str
.
split
(
","
))
print
(
'list2'
,
list2
)
for
i
in
list2
:
# # 请求体
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload_9_1"
)
print
(
'request_body'
,
request_body
)
# 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'result'
,
result
)
# 断言
code
=
commonFuc
().
analysis_json
(
'code'
,
result
)
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
total
=
commonFuc
().
analysis_json
(
'total'
,
data
)
if
code
==
0
and
len
(
data
)
>=
1
and
total
>=
1
:
commonFuc
().
check_text_exist
(
0
,
result
)
else
:
commonFuc
().
check_text_exist
(
'error'
,
result
)
test1
()
test1
()
data/b3_herp3_purchase/data
View file @
810d60e8
...
@@ -6,6 +6,8 @@
...
@@ -6,6 +6,8 @@
data1: "10,20,60"
data1: "10,20,60"
data2: "00001986,一次性医药包-低值,一次性医药包"
data2: "00001986,一次性医药包-低值,一次性医药包"
data3: "abcxxedd,1234456,',!@#$%,select,where 1=1"
data3: "abcxxedd,1234456,',!@#$%,select,where 1=1"
data4: "国药集团,浙江医疗器材,有限公司"
data5: "00001,19,86,一次性,医药,包-低值,包"
"username": "xhs1009"
"username": "xhs1009"
...
@@ -31,6 +33,10 @@ json_headers2: {
...
@@ -31,6 +33,10 @@ json_headers2: {
"payload_7": {"queryObject":{"hosId":"h0347","branchId":"h0347-2011","goodsMfrsName":"国药集团浙江医疗器材有限公司","goodsName":"","purModes":["10"],"provName":"","tbStatus":1,"purchaseFlag":1},"pageNum":1,"pageSize":50}
"payload_7": {"queryObject":{"hosId":"h0347","branchId":"h0347-2011","goodsMfrsName":"国药集团浙江医疗器材有限公司","goodsName":"","purModes":["10"],"provName":"","tbStatus":1,"purchaseFlag":1},"pageNum":1,"pageSize":50}
"payload_8": {"queryObject":{"hosId":"h0347","branchId":"h0347-2011","goodsMfrsName":"","goodsName":"%s","purModes":["10"],"provName":"","tbStatus":1,"purchaseFlag":1},"pageNum":1,"pageSize":50}
"payload_8": {"queryObject":{"hosId":"h0347","branchId":"h0347-2011","goodsMfrsName":"","goodsName":"%s","purModes":["10"],"provName":"","tbStatus":1,"purchaseFlag":1},"pageNum":1,"pageSize":50}
"payload_9": {"queryObject":{"hosId":"h0347","branchId":"h0347-2011","goodsMfrsName":"","goodsName":"","purModes":["10"],"provName":"国药集团浙江医疗器材有限公司","tbStatus":1,"purchaseFlag":1},"pageNum":1,"pageSize":50}
"payload_9": {"queryObject":{"hosId":"h0347","branchId":"h0347-2011","goodsMfrsName":"","goodsName":"","purModes":["10"],"provName":"国药集团浙江医疗器材有限公司","tbStatus":1,"purchaseFlag":1},"pageNum":1,"pageSize":50}
"payload_5_1": {"queryObject":{"hosId":"h0347","branchId":"h0347-2011","goodsMfrsName":"国药集团浙江","goodsName":"000017","purModes":["10"],"provName":"医疗器材有限公司","tbStatus":1,"purchaseFlag":1},"pageNum":1,"pageSize":50}
"payload_6_1": {"queryObject":{"hosId":"h0347","branchId":"h0347-2011","goodsMfrsName":"%s","goodsName":"","purModes":["10"],"provName":"","tbStatus":1,"purchaseFlag":1},"pageNum":1,"pageSize":50}
"payload_8_1": {"queryObject":{"hosId":"h0347","branchId":"h0347-2011","goodsMfrsName":"","goodsName":"%s","purModes":["10"],"provName":"","tbStatus":1,"purchaseFlag":1},"pageNum":1,"pageSize":50}
"payload_9_1": {"queryObject":{"hosId":"h0347","branchId":"h0347-2011","goodsMfrsName":"","goodsName":"","purModes":["10"],"provName":"%s","tbStatus":1,"purchaseFlag":1},"pageNum":1,"pageSize":50}
checkDict2: {"code": 0,'msg': None,'data':1}
checkDict2: {"code": 0,'msg': None,'data':1}
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