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
867a7cdc
Commit
867a7cdc
authored
Oct 27, 2023
by
xiao-hesheng
Browse files
添加院区单元包,供应关系维护,导入院区产品,查询院区产品等脚本
parent
15348204
Changes
15
Hide whitespace changes
Inline
Side-by-side
air_case/a2_herp3_bs/d9_在耗材分类中添加产品.air/d9_在耗材分类中添加产品.py
View file @
867a7cdc
...
...
@@ -12,8 +12,8 @@ from common.timeUtils import timeUtils
__author__
=
"xiaohesheng"
"""
case_tag:api,herp-web,d
8
_在耗材分类中添加产品,id2263,id2263-39,sit,on
内网:d
8
_在耗材分类中添加产品
case_tag:api,herp-web,d
9
_在耗材分类中添加产品,id2263,id2263-39,sit,on
内网:d
9
_在耗材分类中添加产品
"""
from
common.common_func
import
commonFuc
...
...
@@ -31,8 +31,8 @@ kind_id=get_kind_id()
module
=
"a2_herp3_bs"
def
add_goods_in_kind
():
"""
场景:d
8
_在耗材分类中添加产品
用例名称:d
8
_在耗材分类中添加产品
场景:d
9
_在耗材分类中添加产品
用例名称:d
9
_在耗材分类中添加产品
输入:无
输出:"rtn_msg": {"code": 0, "msg": null, "data": 1}
"""
...
...
@@ -44,7 +44,7 @@ def add_goods_in_kind():
# 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
,
info
=
login_system
(
username
,
password
).
get_token
()
# print( token,projectCode,uxid,corpId,info)
#d
8
_在耗材分类中添加产品
#d
9
_在耗材分类中添加产品
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"goodsKindCollection_save_url"
)
# 获取请求头信息
...
...
air_case/a2_herp3_bs/e0_产品供应关系维护_查询供应商.air/e0_产品供应关系维护_查询供应商.py
0 → 100644
View file @
867a7cdc
# -*- encoding=utf8 -*-
import
sys
from
airtest.core.helper
import
using
from
common.db.sql.sql_del_branch_info
import
delByBranchId
from
common.db.sql.sql_del_kind_goodsinfo
import
delKindGoodsinfo
from
common.db.sql.sql_del_notices_info
import
delByNoticeName
from
common.fileUtls
import
FileUtils
from
common.timeUtils
import
timeUtils
__author__
=
"xiaohesheng"
"""
case_tag:api,herp-web,e0_产品供应关系维护_查询供应商,id2263,id2263-40,sit,on
内网:e0_产品供应关系维护_查询供应商
"""
from
common.common_func
import
commonFuc
from
air_case.a1_herp3_login.登录内网系统.登录内网系统
import
login_system
module
=
"a2_herp3_bs"
def
select_supplyRelation_tree
():
"""
场景:e0_产品供应关系维护_查询供应商
用例名称:e0_产品供应关系维护_查询供应商
输入:无
输出:"rtn_msg": {"code": 0, "msg": null, "data": 1}
"""
#内网登录
username
=
commonFuc
().
get_business_data
(
module
,
"username"
)
# print('医院名称',username)
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
# print(username, password,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
# 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
,
info
=
login_system
(
username
,
password
).
get_token
()
# print( token,projectCode,uxid,corpId,info)
#e0_产品供应关系维护_查询供应商
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"supplyRelation_url"
)
# 获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
commonFuc
().
get_business_data
(
module
,
"X-APP-CODE"
))
# #请求体
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload29"
)
print
(
request_body
)
# # # 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'result'
,
result
)
# #断言
# checkDict=commonFuc().get_business_data(module,'checkDict10')
commonFuc
().
check_text_exist
(
"国药集团浙江医疗器材有限公司"
,
result
)
select_supplyRelation_tree
()
air_case/a2_herp3_bs/e1_产品供应关系维护_查询产品_无产品.air/e1_产品供应关系维护_查询产品_无产品.py
0 → 100644
View file @
867a7cdc
# -*- encoding=utf8 -*-
import
sys
from
airtest.core.helper
import
using
from
common.db.sql.sql_del_branch_info
import
delByBranchId
from
common.db.sql.sql_del_kind_goodsinfo
import
delKindGoodsinfo
from
common.db.sql.sql_del_notices_info
import
delByNoticeName
from
common.fileUtls
import
FileUtils
from
common.timeUtils
import
timeUtils
__author__
=
"xiaohesheng"
"""
case_tag:api,herp-web,e1_产品供应关系维护_查询产品_无产品,id2263,id2263-41,sit,on
内网:e1_产品供应关系维护_查询产品_无产品
"""
from
common.common_func
import
commonFuc
from
air_case.a1_herp3_login.登录内网系统.登录内网系统
import
login_system
module
=
"a2_herp3_bs"
def
select_goods
():
"""
场景:e1_产品供应关系维护_查询产品_无产品
用例名称:e1_产品供应关系维护_查询产品_无产品
输入:无
输出:"rtn_msg": {"code": 0, "msg": null, "data": 1}
"""
#内网登录
username
=
commonFuc
().
get_business_data
(
module
,
"username"
)
# print('医院名称',username)
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
# print(username, password,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
# 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
,
info
=
login_system
(
username
,
password
).
get_token
()
# print( token,projectCode,uxid,corpId,info)
#e1_产品供应关系维护_查询产品_无产品
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"supplyProvHosGoods_url"
)
# 获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
commonFuc
().
get_business_data
(
module
,
"X-APP-CODE"
))
# #请求体
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload30"
)
print
(
request_body
)
# # # 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'result'
,
result
)
# #断言
total
=
commonFuc
().
analysis_json
(
'total'
,
result
)
if
total
==
0
:
commonFuc
().
check_text_exist
(
0
,
result
)
else
:
commonFuc
().
check_text_exist
(
500
,
result
)
select_goods
()
air_case/a2_herp3_bs/e2_产品供应关系维护_查询产品_有产品.air/e2_产品供应关系维护_查询产品_有产品.py
0 → 100644
View file @
867a7cdc
# -*- encoding=utf8 -*-
import
sys
from
airtest.core.helper
import
using
from
common.db.sql.sql_del_branch_info
import
delByBranchId
from
common.db.sql.sql_del_kind_goodsinfo
import
delKindGoodsinfo
from
common.db.sql.sql_del_notices_info
import
delByNoticeName
from
common.fileUtls
import
FileUtils
from
common.timeUtils
import
timeUtils
__author__
=
"xiaohesheng"
"""
case_tag:api,herp-web,e2_产品供应关系维护_查询产品_有产品,id2263,id2263-42,sit,on
内网:e2_产品供应关系维护_查询产品_有产品
"""
from
common.common_func
import
commonFuc
from
air_case.a1_herp3_login.登录内网系统.登录内网系统
import
login_system
module
=
"a2_herp3_bs"
def
select_goods
():
"""
场景:e2_产品供应关系维护_查询产品_有产品
用例名称:e2_产品供应关系维护_查询产品_有产品
输入:无
输出:"rtn_msg": {"code": 0, "msg": null, "data": 1}
"""
#内网登录
username
=
commonFuc
().
get_business_data
(
module
,
"username"
)
# # print('医院名称',username)
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
# print(username, password,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
# 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
,
info
=
login_system
(
username
,
password
).
get_token
()
# print( token,projectCode,uxid,corpId,info)
#e2_产品供应关系维护_查询产品_有产品
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"supplyProvHosGoods_url"
)
# 获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
commonFuc
().
get_business_data
(
module
,
"X-APP-CODE"
))
# #请求体
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload31"
)
print
(
request_body
)
# # # 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'result'
,
result
)
# #断言
commonFuc
().
check_text_exist
(
'指引导管'
,
result
)
select_goods
()
air_case/a2_herp3_bs/e3_院区产品设置_查询院区产品_查不到内容.air/e3_院区产品设置_查询院区产品_查不到内容.py
0 → 100644
View file @
867a7cdc
# -*- encoding=utf8 -*-
import
sys
from
airtest.core.helper
import
using
from
common.db.sql.sql_del_branch_info
import
delByBranchId
from
common.db.sql.sql_del_kind_goodsinfo
import
delKindGoodsinfo
from
common.db.sql.sql_del_notices_info
import
delByNoticeName
from
common.fileUtls
import
FileUtils
from
common.timeUtils
import
timeUtils
__author__
=
"xiaohesheng"
"""
case_tag:api,herp-web,e3_院区产品设置_查询院区产品_查不到内容,id2263,id2263-43,sit,on
内网:e3_院区产品设置_查询院区产品_查不到内容
"""
from
common.common_func
import
commonFuc
from
air_case.a1_herp3_login.登录内网系统.登录内网系统
import
login_system
module
=
"a2_herp3_bs"
def
branch_goods_set
():
"""
场景:e3_院区产品设置_查询院区产品_查不到内容
用例名称:e3_院区产品设置_查询院区产品_查不到内容
输入:无
输出:"rtn_msg": {"code": 0, "msg": null, "data": 1}
"""
#内网登录
username
=
commonFuc
().
get_business_data
(
module
,
"username"
)
# # print('医院名称',username)
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
# print(username, password,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
# 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
,
info
=
login_system
(
username
,
password
).
get_token
()
# print( token,projectCode,uxid,corpId,info)
#e3_院区产品设置_查询院区产品_查不到内容
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"mcmsDeptGoodsInfo_url"
)
# 获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
commonFuc
().
get_business_data
(
module
,
"X-APP-CODE"
))
#获取院区id
branch_id
=
FileUtils
().
r_info
(
module
,
'院区新增'
)[
"branch_id"
]
# #请求体
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload32"
,
branch_id
)
print
(
request_body
)
# # # 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'result'
,
result
)
# #断言
total
=
commonFuc
().
analysis_json
(
'total'
,
commonFuc
().
analysis_json
(
'data'
,
result
))
if
total
==
0
:
commonFuc
().
check_text_exist
(
0
,
result
)
else
:
commonFuc
().
check_text_exist
(
500
,
result
)
branch_goods_set
()
air_case/a2_herp3_bs/e4_导入医院产品_查询产品信息.air/e4_导入医院产品_查询产品信息.py
0 → 100644
View file @
867a7cdc
# -*- encoding=utf8 -*-
import
sys
from
airtest.core.helper
import
using
from
common.db.sql.sql_del_branch_info
import
delByBranchId
from
common.db.sql.sql_del_kind_goodsinfo
import
delKindGoodsinfo
from
common.db.sql.sql_del_notices_info
import
delByNoticeName
from
common.fileUtls
import
FileUtils
from
common.timeUtils
import
timeUtils
__author__
=
"xiaohesheng"
"""
case_tag:api,herp-web,e4_导入医院产品_查询产品信息.air,id2263,id2263-44,sit,on
内网:e4_导入医院产品_查询产品信息.air
"""
from
common.common_func
import
commonFuc
from
air_case.a1_herp3_login.登录内网系统.登录内网系统
import
login_system
module
=
"a2_herp3_bs"
def
branch_goods_select
():
"""
场景:e4_导入医院产品_查询产品信息.air
用例名称:e4_导入医院产品_查询产品信息.air
输入:无
输出:"rtn_msg": {"code": 0, "msg": null, "data": 1}
"""
#内网登录
username
=
commonFuc
().
get_business_data
(
module
,
"username"
)
# # print('医院名称',username)
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
# print(username, password,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
# 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
,
info
=
login_system
(
username
,
password
).
get_token
()
# print( token,projectCode,uxid,corpId,info)
#e4_导入医院产品_查询产品信息.air
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"mcmsBranchGoodsInfo_unBindPage_url"
)
# 获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
commonFuc
().
get_business_data
(
module
,
"X-APP-CODE"
))
#获取院区id
branch_id
=
FileUtils
().
r_info
(
module
,
'院区新增'
)[
"branch_id"
]
# #请求体
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload33"
,
branch_id
)
print
(
request_body
)
# # # 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'result'
,
result
)
# #断言
total
=
commonFuc
().
analysis_json
(
'total'
,
commonFuc
().
analysis_json
(
'data'
,
result
))
if
total
>=
1
:
commonFuc
().
check_text_exist
(
0
,
result
)
data
=
commonFuc
().
analysis_json
(
'data'
,
commonFuc
().
analysis_json
(
'data'
,
result
))
return
commonFuc
().
analysis_json
(
'hosGoodsId'
,
data
[
0
])
else
:
commonFuc
().
check_text_exist
(
500
,
result
)
branch_goods_select
()
air_case/a2_herp3_bs/e5_导入一个产品_无中心库.air/e5_导入一个产品_无中心库.py
0 → 100644
View file @
867a7cdc
# -*- encoding=utf8 -*-
import
sys
from
airtest.core.helper
import
using
from
common.db.sql.sql_del_branch_info
import
delByBranchId
from
common.db.sql.sql_del_kind_goodsinfo
import
delKindGoodsinfo
from
common.db.sql.sql_del_notices_info
import
delByNoticeName
from
common.fileUtls
import
FileUtils
from
common.timeUtils
import
timeUtils
__author__
=
"xiaohesheng"
"""
case_tag:api,herp-web,e5_导入一个产品_无中心库.air,id2263,id2263-45,sit,on
内网:e5_导入一个产品_无中心库.air
"""
from
common.common_func
import
commonFuc
from
air_case.a1_herp3_login.登录内网系统.登录内网系统
import
login_system
module
=
"a2_herp3_bs"
def
branch_goods_add
():
"""
场景:e5_导入一个产品_无中心库.air
用例名称:e5_导入一个产品_无中心库.air
输入:无
输出:"rtn_msg": {"code": 0, "msg": null, "data": 1}
"""
#内网登录
username
=
commonFuc
().
get_business_data
(
module
,
"username"
)
# # print('医院名称',username)
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
# print(username, password,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
# 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
,
info
=
login_system
(
username
,
password
).
get_token
()
# print( token,projectCode,uxid,corpId,info)
#e5_导入一个产品_无中心库.air
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"importGoods_url"
)
# 获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
commonFuc
().
get_business_data
(
module
,
"X-APP-CODE"
))
pro_path
=
commonFuc
().
get_pro_path
()
sys
.
path
.
append
(
pro_path
+
r
'\\air_case\\a2_herp3_bs\\d7_查询产品列表信息_未分类.air'
)
using
(
pro_path
+
r
'\\air_case\\a2_herp3_bs\\d7_查询产品列表信息_未分类.air'
)
from
d7_查询产品列表信息_未分类
import
select_goods_info
hosGoodsId
=
select_goods_info
()
# #请求体
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload34"
,
hosGoodsId
)
print
(
request_body
)
# # # 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'result'
,
result
)
# #断言
# total=commonFuc().analysis_json('total',commonFuc().analysis_json('data',result))
checkDict
=
commonFuc
().
get_business_data
(
module
,
'checkDict12'
)
commonFuc
().
check_result
(
checkDict
,
result
)
branch_goods_add
()
air_case/a2_herp3_bs/e6_导入一个产品_有中心库.air/e6_导入一个产品_有中心库.py
0 → 100644
View file @
867a7cdc
# -*- encoding=utf8 -*-
import
sys
from
airtest.core.helper
import
using
from
common.db.sql.sql_del_branch_info
import
delByBranchId
from
common.db.sql.sql_del_kind_goodsinfo
import
delKindGoodsinfo
from
common.db.sql.sql_del_notices_info
import
delByNoticeName
from
common.fileUtls
import
FileUtils
from
common.timeUtils
import
timeUtils
__author__
=
"xiaohesheng"
"""
case_tag:api,herp-web,e6_导入一个产品_有中心库.air,id2263,id2263-46,sit,on
内网:e6_导入一个产品_有中心库.air
"""
from
common.common_func
import
commonFuc
from
air_case.a1_herp3_login.登录内网系统.登录内网系统
import
login_system
module
=
"a2_herp3_bs"
def
branch_goods_add
():
"""
场景:e6_导入一个产品_有中心库.air
用例名称:e6_导入一个产品_有中心库.air
输入:无
输出:"rtn_msg": {"code": 0, "msg": null, "data": 1}
"""
#内网登录
username
=
commonFuc
().
get_business_data
(
module
,
"username"
)
# # print('医院名称',username)
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
# print(username, password,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
# 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
,
info
=
login_system
(
username
,
password
).
get_token
()
# print( token,projectCode,uxid,corpId,info)
#e6_导入一个产品_有中心库
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"importGoods_url"
)
# 获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
commonFuc
().
get_business_data
(
module
,
"X-APP-CODE"
))
pro_path
=
commonFuc
().
get_pro_path
()
sys
.
path
.
append
(
pro_path
+
r
'\\air_case\\a2_herp3_bs\\e4_导入医院产品_查询产品信息.air'
)
using
(
pro_path
+
r
'\\air_case\\a2_herp3_bs\\e4_导入医院产品_查询产品信息.air'
)
from
e4_导入医院产品_查询产品信息
import
branch_goods_select
hosGoodsId
=
branch_goods_select
()
#获取院区id
branch_id
=
FileUtils
().
r_info
(
module
,
'院区新增'
)[
"branch_id"
]
# #请求体
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload35"
,
hosGoodsId
,
branch_id
)
print
(
request_body
)
# # # 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'result'
,
result
)
# #断言
# total=commonFuc().analysis_json('total',commonFuc().analysis_json('data',result))
checkDict
=
commonFuc
().
get_business_data
(
module
,
'checkDict13'
)
commonFuc
().
check_result
(
checkDict
,
result
)
branch_goods_add
()
air_case/a2_herp3_bs/e7_一键导入产品_无中心库.air/e7_一键导入产品_无中心库.py
0 → 100644
View file @
867a7cdc
# -*- encoding=utf8 -*-
import
sys
from
airtest.core.helper
import
using
from
common.db.sql.sql_del_branch_info
import
delByBranchId
from
common.db.sql.sql_del_kind_goodsinfo
import
delKindGoodsinfo
from
common.db.sql.sql_del_notices_info
import
delByNoticeName
from
common.fileUtls
import
FileUtils
from
common.timeUtils
import
timeUtils
__author__
=
"xiaohesheng"
"""
case_tag:api,herp-web,e7_一键导入产品_无中心库.air,id2263,id2263-47,sit,on
内网:e7_一键导入产品_无中心库.air
"""
from
common.common_func
import
commonFuc
from
air_case.a1_herp3_login.登录内网系统.登录内网系统
import
login_system
module
=
"a2_herp3_bs"
def
branch_goods_add
():
"""
场景:e7_一键导入产品_无中心库.air
用例名称:e7_一键导入产品_无中心库.air
输入:无
输出:"rtn_msg": {"code": 0, "msg": null, "data": 1}
"""
#内网登录
username
=
commonFuc
().
get_business_data
(
module
,
"username"
)
# # print('医院名称',username)
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
# print(username, password,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
# 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
,
info
=
login_system
(
username
,
password
).
get_token
()
# print( token,projectCode,uxid,corpId,info)
#e7_一键导入产品_无中心库
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"oneKeyImportGoods_url"
)
# 获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
commonFuc
().
get_business_data
(
module
,
"X-APP-CODE"
))
#"branchId": "这里写的是一个没有创建中心库的院区编码"
# branch_id = FileUtils().r_info(module, '院区新增')["branch_id"]
# #请求体
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload36"
)
print
(
request_body
)
# # # 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'result'
,
result
)
# #断言
# total=commonFuc().analysis_json('total',commonFuc().analysis_json('data',result))
checkDict
=
commonFuc
().
get_business_data
(
module
,
'checkDict14'
)
commonFuc
().
check_result
(
checkDict
,
result
)
branch_goods_add
()
air_case/a2_herp3_bs/e8_一键导入产品_有中心库.air/e8_一键导入产品_有中心库.py
0 → 100644
View file @
867a7cdc
# -*- encoding=utf8 -*-
import
sys
from
airtest.core.helper
import
using
from
common.db.sql.sql_del_branch_info
import
delByBranchId
from
common.db.sql.sql_del_kind_goodsinfo
import
delKindGoodsinfo
from
common.db.sql.sql_del_notices_info
import
delByNoticeName
from
common.fileUtls
import
FileUtils
from
common.timeUtils
import
timeUtils
__author__
=
"xiaohesheng"
"""
case_tag:api,herp-web,e8_一键导入产品_有中心库.air,id2263,id2263-48,sit,on
内网:e8_一键导入产品_有中心库.air
"""
from
common.common_func
import
commonFuc
from
air_case.a1_herp3_login.登录内网系统.登录内网系统
import
login_system
module
=
"a2_herp3_bs"
def
branch_goods_add
():
"""
场景:e8_一键导入产品_有中心库
用例名称:e8_一键导入产品_有中心库
输入:无
输出:"rtn_msg": {"code": 0, "msg": null, "data": 1}
"""
#内网登录
username
=
commonFuc
().
get_business_data
(
module
,
"username"
)
# # print('医院名称',username)
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
# print(username, password,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
# 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
,
info
=
login_system
(
username
,
password
).
get_token
()
# print( token,projectCode,uxid,corpId,info)
#e8_一键导入产品_有中心库
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"oneKeyImportGoods_url"
)
# 获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
commonFuc
().
get_business_data
(
module
,
"X-APP-CODE"
))
#获取branch_id
branch_id
=
FileUtils
().
r_info
(
module
,
'院区新增'
)[
"branch_id"
]
# #请求体
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload37"
,
branch_id
)
print
(
request_body
)
# # # 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'result'
,
result
)
# #断言
# total=commonFuc().analysis_json('total',commonFuc().analysis_json('data',result))
# checkDict=commonFuc().get_business_data(module,'checkDict14')
# data=commonFuc().analysis_json('data',result)
commonFuc
().
check_text_exist
(
'-h0347-2658'
,
result
)
branch_goods_add
()
air_case/a2_herp3_bs/e9_查询院区产品_查到内容.air/e9_查询院区产品_查到内容.py
0 → 100644
View file @
867a7cdc
# -*- encoding=utf8 -*-
import
sys
from
airtest.core.helper
import
using
from
common.db.sql.sql_del_branch_info
import
delByBranchId
from
common.db.sql.sql_del_kind_goodsinfo
import
delKindGoodsinfo
from
common.db.sql.sql_del_notices_info
import
delByNoticeName
from
common.fileUtls
import
FileUtils
from
common.timeUtils
import
timeUtils
__author__
=
"xiaohesheng"
"""
case_tag:api,herp-web,e9_查询院区产品_查到内容,id2263,id2263-49,sit,on
内网:e9_查询院区产品_查到内容
"""
from
common.common_func
import
commonFuc
from
air_case.a1_herp3_login.登录内网系统.登录内网系统
import
login_system
module
=
"a2_herp3_bs"
def
branch_goods_select
():
"""
场景:e9_查询院区产品_查到内容
用例名称:e9_查询院区产品_查到内容
输入:无
输出:"rtn_msg": {"code": 0, "msg": null, "data": 1}
"""
#内网登录
username
=
commonFuc
().
get_business_data
(
module
,
"username"
)
# # print('医院名称',username)
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
# print(username, password,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
# 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
,
info
=
login_system
(
username
,
password
).
get_token
()
# print( token,projectCode,uxid,corpId,info)
#e9_查询院区产品_查到内容
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"mcmsDeptGoodsInfo_url"
)
# 获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
commonFuc
().
get_business_data
(
module
,
"X-APP-CODE"
))
#获取院区id
branch_id
=
FileUtils
().
r_info
(
module
,
'院区新增'
)[
"branch_id"
]
# #请求体
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload32"
,
branch_id
)
print
(
request_body
)
# # # 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'result'
,
result
)
# #断言
total
=
commonFuc
().
analysis_json
(
'total'
,
commonFuc
().
analysis_json
(
'data'
,
result
))
if
total
>=
1
:
commonFuc
().
check_text_exist
(
0
,
result
)
else
:
commonFuc
().
check_text_exist
(
500
,
result
)
branch_goods_select
()
air_case/a2_herp3_bs/f0_院区单元包设置_查询产品信息.air/f0_院区单元包设置_查询产品信息.py
0 → 100644
View file @
867a7cdc
# -*- encoding=utf8 -*-
import
sys
from
airtest.core.helper
import
using
from
common.db.sql.sql_del_branch_info
import
delByBranchId
from
common.db.sql.sql_del_kind_goodsinfo
import
delKindGoodsinfo
from
common.db.sql.sql_del_notices_info
import
delByNoticeName
from
common.fileUtls
import
FileUtils
from
common.timeUtils
import
timeUtils
__author__
=
"xiaohesheng"
"""
case_tag:api,herp-web,f0_院区单元包设置_查询产品信息,id2263,id2263-50,sit,on
内网:f0_院区单元包设置_查询产品信息
"""
from
common.common_func
import
commonFuc
from
air_case.a1_herp3_login.登录内网系统.登录内网系统
import
login_system
module
=
"a2_herp3_bs"
def
branch_goods_select
():
"""
场景:f0_院区单元包设置_查询产品信息
用例名称:f0_院区单元包设置_查询产品信息
输入:无
输出:"rtn_msg": {"code": 0, "msg": null, "data": 1}
"""
#内网登录
username
=
commonFuc
().
get_business_data
(
module
,
"username"
)
# # print('医院名称',username)
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
# print(username, password,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
# 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
,
info
=
login_system
(
username
,
password
).
get_token
()
# print( token,projectCode,uxid,corpId,info)
#f0_院区单元包设置_查询产品信息
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"mcmsBranchGoodsInfo_url"
)
# 获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
commonFuc
().
get_business_data
(
module
,
"X-APP-CODE"
))
#获取院区id
branch_id
=
FileUtils
().
r_info
(
module
,
'院区新增'
)[
"branch_id"
]
# #请求体
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload38"
,
branch_id
)
print
(
request_body
)
# # # 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'result'
,
result
)
# #断言
total
=
commonFuc
().
analysis_json
(
'total'
,
commonFuc
().
analysis_json
(
'data'
,
result
))
if
total
>=
1
:
commonFuc
().
check_text_exist
(
0
,
result
)
else
:
commonFuc
().
check_text_exist
(
500
,
result
)
branch_goods_select
()
air_case/a2_herp3_bs/f1_院区单元包设置_查询产品信息_未维护单元包.air/f1_院区单元包设置_查询产品信息_未维护单元包.py
0 → 100644
View file @
867a7cdc
# -*- encoding=utf8 -*-
import
sys
from
airtest.core.helper
import
using
from
common.db.sql.sql_del_branch_info
import
delByBranchId
from
common.db.sql.sql_del_kind_goodsinfo
import
delKindGoodsinfo
from
common.db.sql.sql_del_notices_info
import
delByNoticeName
from
common.fileUtls
import
FileUtils
from
common.timeUtils
import
timeUtils
__author__
=
"xiaohesheng"
"""
case_tag:api,herp-web,f1_院区单元包设置_查询产品信息_未维护单元包,id2263,id2263-51,sit,on
内网:f1_院区单元包设置_查询产品信息_未维护单元包
"""
from
common.common_func
import
commonFuc
from
air_case.a1_herp3_login.登录内网系统.登录内网系统
import
login_system
module
=
"a2_herp3_bs"
def
branch_goods_select
():
"""
场景:f1_院区单元包设置_查询产品信息_未维护单元包
用例名称:f1_院区单元包设置_查询产品信息_未维护单元包
输入:无
输出:"rtn_msg": {"code": 0, "msg": null, "data": 1}
"""
#内网登录
username
=
commonFuc
().
get_business_data
(
module
,
"username"
)
# # print('医院名称',username)
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
# print(username, password,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
# 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
,
info
=
login_system
(
username
,
password
).
get_token
()
# print( token,projectCode,uxid,corpId,info)
#f1_院区单元包设置_查询产品信息_未维护单元包
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"mcmsBranchGoodsInfo_url"
)
# 获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
commonFuc
().
get_business_data
(
module
,
"X-APP-CODE"
))
#获取院区id
branch_id
=
FileUtils
().
r_info
(
module
,
'院区新增'
)[
"branch_id"
]
# #请求体
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload39"
,
branch_id
)
print
(
request_body
)
# # # 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'result'
,
result
)
# #断言
total
=
commonFuc
().
analysis_json
(
'total'
,
commonFuc
().
analysis_json
(
'data'
,
result
))
if
total
>=
0
:
commonFuc
().
check_text_exist
(
0
,
result
)
else
:
commonFuc
().
check_text_exist
(
500
,
result
)
branch_goods_select
()
data/a2_herp3_bs/data
View file @
867a7cdc
...
...
@@ -17,6 +17,13 @@
"goodsKindTree_updateById_url": "/hospitaltest2api/herpService/goodsKind/updateById/"
"goodsKindCollection_url": "/hospitaltest2api/herpService/goodsKindCollection/page/"
"goodsKindCollection_save_url": "/hospitaltest2api/herpService/goodsKindCollection/save/"
"supplyRelation_url": "/hospitaltest2api/herpService/supplyRelation/tree/"
"supplyProvHosGoods_url": "/hospitaltest2api/herpService/supplyProvHosGoods/queryPage"
"mcmsDeptGoodsInfo_url": "/hospitaltest2api/herpService/basic/mcmsDeptGoodsInfo/page"
"mcmsBranchGoodsInfo_unBindPage_url": "/hospitaltest2api/herpService/basic/mcmsBranchGoodsInfo/unBindPage"
"importGoods_url": "/hospitaltest2api/herpService/basic/mcmsBranchGoodsInfo/importGoods"
"oneKeyImportGoods_url": "/hospitaltest2api/herpService/basic/mcmsBranchGoodsInfo/oneKeyImportGoods"
"mcmsBranchGoodsInfo_url": "/hospitaltest2api/herpService/basic/mcmsBranchGoodsInfo/page"
"username": "xhs1009"
"password": "1qaz!QAZ"
"X-APP-CODE": "herp.pc"
...
...
@@ -185,6 +192,20 @@ json_headers2: {
"payload26": {"queryObject":{"goodsCode":"","goodsRegCert":"","goodsMfrsName":"","purModes":[],"tbStatus":"","hosId":"h0347","kindId":"","kindType":"1","checkFlag":1},"pageNum":1,"pageSize":50}
"payload27": {"hosId":"h0347","keyword":"999_2","kindType":"1"}
"payload28": {"hosGoodsIds": ["%s"],"hosId": "h0347","kindId": "%s"}
"payload29": {"hosId": "h0347","keyword": "国药集团浙江医疗器材有限公司"}
"payload30": {"queryObject": {"goodsName": "xhs","provId": "p00001c0f","subProvId": null,"hosId": "h0347"},"pageNum": 1,"pageSize": 50}
"payload31": {"queryObject": {"goodsName": "00001816","provId": "p56a4","subProvId": null,"hosId": "h0347"},"pageNum": 1,"pageSize": 50}
"payload32": {"pageNum": 1,"pageSize": 50,"queryObject": {"hosId": "h0347","goodsName": "","tbStatus": "","goodsSpec": "","purModes": [],"branchId": "%s"}}
"payload33": {"queryObject": {"hosId": "h0347","branchId": "%s","goodsName": "指引导管","goodsMfrsName": "","goodsSpec": ""},"pageNum": 1,"pageSize": 50}
"payload34": {"hosGoodsIds": ["%s"],"hosId": "h0347","branchId": "h0347-621"}
"payload35": {"hosGoodsIds": ["%s"],"hosId": "h0347","branchId": "%s"}
"payload36": {"hosId": "h0347","branchId": "h0347-621"}
"payload37": {"hosId": "h0347","branchId": "%s"}
"payload38": {"pageNum": 1,"pageSize": 50,"queryObject": {"branchId": "%s","hosId": "h0347","goodsName": "","purModes": [10,60],"notPkg": false,"goodsSpec": ""}}
"payload39": {"pageNum": 1,"pageSize": 50,"queryObject": {"branchId":"%s","hosId": "h0347", "goodsName": "", "purModes": [ 10,60],"notPkg": true,"goodsSpec": ""}}
checkDict: {"code": 0,'msg': None,'data': True}
checkDict1: {
...
...
@@ -254,4 +275,10 @@ checkDict7: {'code': 1100000, 'msg': '暂时没有定义异码,中文描述为:
checkDict8: {'code': 14030004, 'msg': '同一个分类类型下产品分类名称不能重复,请修改后继续操作', 'tag': '/herpService:gyqx.spd.herp.basic.service.impl.GoodsKindServiceImpl:316', 'data': None}
checkDict9: {'code': 0, 'msg': None, 'tag': None, 'data': [{'id': '209e180ed4594f65b40c5ed4253fa6ae', 'pid': '-', 'ordinal': 0, 'cname': '9999', 'extra': {'kindType': '1',
'kindCode': '9999', 'kindLevel': 0, 'leafFlag': 1, 'tbStatus': 0}, 'children': None}]}
checkDict10: {'code': 0, 'msg': None, 'tag': None, 'data': 1}
\ No newline at end of file
checkDict10: {'code': 0, 'msg': None, 'tag': None, 'data': 1}
checkDict11: {'code': 0, 'msg': None, 'tag': None, 'data': {'pageNum': 1, 'pageSize': 50, 'total': 0, 'data': [], 'totalInfo': None}}
checkDict12: {'code': 1100000, 'msg': '暂时没有定义异码,中文描述为:请先创建设备科及中心库!', 'tag': '/herpService:gyqx.spd.herp.basic.service.impl.BranchGoodsInfoServiceIm
pl:362', 'data': None}
checkDict13: {'code': 0, 'msg': None, 'tag': None, 'data': None}
checkDict14: {'code': 1100000, 'msg': '暂时没有定义异码,中文描述为:请先创建设备科及中心库!', 'tag': '/herpService:gyqx.spd.herp.basic.service.impl.BranchGoodsInfoServiceIm
pl:423', 'data': None}
\ No newline at end of file
report/summary.html
View file @
867a7cdc
...
...
@@ -54,9 +54,9 @@
</tr>
<tr
width=
"600"
>
<td
class=
'details-col-elapsed'
>
4
</td>
<td
class=
'details-col-elapsed'
>
4
</td>
<td
class=
'details-col-elapsed'
>
0分
3
秒
</td>
<td
class=
'details-col-elapsed'
>
1
</td>
<td
class=
'details-col-elapsed'
>
1
</td>
<td
class=
'details-col-elapsed'
>
0分
1
秒
</td>
<td
class=
"details-col-elapsed"
>
100.0%
</td>
</tr>
</table>
...
...
@@ -72,30 +72,9 @@
</tr>
<tr
width=
"600"
>
<td
class=
"details-col-elapsed"
><a
href=
'../log/
c9_产品管理_产品维护_新增耗材分类
/log.html'
target=
'_blank'
>
c9_产品管理_产品维护_新增耗材分类
</a></td>
<td
class=
"details-col-elapsed"
><a
href=
'../log/
f1_院区单元包设置_查询产品信息_未维护单元包
/log.html'
target=
'_blank'
>
f1_院区单元包设置_查询产品信息_未维护单元包
</a></td>
<td
class=
"success"
>
成功
</td>
<td
class=
"details-col-elapsed"
>
0.699
</td>
<td
class=
"details-col-elapsed"
>
xiaohesheng
</td>
</tr>
<tr
width=
"600"
>
<td
class=
"details-col-elapsed"
><a
href=
'../log/d0_产品管理_产品维护_新增耗材分类_分类已存在/log.html'
target=
'_blank'
>
d0_产品管理_产品维护_新增耗材分类_分类已存在
</a></td>
<td
class=
"success"
>
成功
</td>
<td
class=
"details-col-elapsed"
>
0.512
</td>
<td
class=
"details-col-elapsed"
>
xiaohesheng
</td>
</tr>
<tr
width=
"600"
>
<td
class=
"details-col-elapsed"
><a
href=
'../log/d1_产品管理_产品维护_耗材分类_查询耗材分类/log.html'
target=
'_blank'
>
d1_产品管理_产品维护_耗材分类_查询耗材分类
</a></td>
<td
class=
"success"
>
成功
</td>
<td
class=
"details-col-elapsed"
>
0.469
</td>
<td
class=
"details-col-elapsed"
>
xiaohesheng
</td>
</tr>
<tr
width=
"600"
>
<td
class=
"details-col-elapsed"
><a
href=
'../log/d2_新增耗材分类_新增不存在的_有上级耗材分类/log.html'
target=
'_blank'
>
d2_新增耗材分类_新增不存在的_有上级耗材分类
</a></td>
<td
class=
"success"
>
成功
</td>
<td
class=
"details-col-elapsed"
>
1.477
</td>
<td
class=
"details-col-elapsed"
>
1.091
</td>
<td
class=
"details-col-elapsed"
>
xiaohesheng
</td>
</tr>
...
...
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