Commit 5c1471af authored by xiao-hesheng's avatar xiao-hesheng
Browse files

修改脚本适合融合环境

parent 85934904
...@@ -4,7 +4,7 @@ __author__ = "xiaohesheng" ...@@ -4,7 +4,7 @@ __author__ = "xiaohesheng"
""" """
暂未调试脚本 暂未调试脚本
case_tag:api,mdm-web,私立医院注册,id2249,id2249-2,sit,on,10086 case_tag:api,mdm-web,私立医院注册,id2249,id2249-1,sit,on,10086
主数据平台:私立医院注册 主数据平台:私立医院注册
""" """
from common.common_func import commonFuc from common.common_func import commonFuc
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
__author__ = "xiaohesheng" __author__ = "xiaohesheng"
""" """
case_tag:api,mdm-web,医院注册时医院已存在,id2249,id2249-3,sit,on,10086 case_tag:api,mdm-web,医院注册时医院已存在,id2249,id2249-2,sit,on,10086
主数据平台:医院注册时医院已存在 主数据平台:医院注册时医院已存在
""" """
from common.common_func import commonFuc from common.common_func import commonFuc
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
__author__ = "xiaohesheng" __author__ = "xiaohesheng"
""" """
case_tag:api,mdm-web,公立医院注册,id2249,id2249-1,sit,on,10086 case_tag:api,mdm-web,公立医院注册,id2249,id2249-3,sit,on,10086
主数据平台:公立医院注册 主数据平台:公立医院注册
""" """
from common.common_func import commonFuc from common.common_func import commonFuc
...@@ -23,7 +23,7 @@ request_body = commonFuc().get_business_data(module, "payload",h_name,h_name,h_n ...@@ -23,7 +23,7 @@ request_body = commonFuc().get_business_data(module, "payload",h_name,h_name,h_n
result = commonFuc().http_post(url, request_body, headers) result = commonFuc().http_post(url, request_body, headers)
#获取接口返回数据 #获取接口返回数据
check_dict = commonFuc().get_business_data(module, "checkDict") check_dict = commonFuc().get_business_data(module, "checkDict")
print(h_name,result)
#断言实际结果中是否包含预期结果的内容 #断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result) commonFuc().check_result(check_dict, result)
......
# -*- encoding=utf8 -*- # -*- encoding=utf8 -*-
from air_case.mdm_login.登录外网系统.登录外网系统 import login_system from air_case.mdm_login.登录外网系统.登录资源管控平台 import login_system
from common.fileUtls import FileUtils
from common.timeUtils import timeUtils from common.timeUtils import timeUtils
__author__ = "xiaohesheng" __author__ = "xiaohesheng"
...@@ -28,8 +29,8 @@ def reg_and_audit_hospital(type=1): ...@@ -28,8 +29,8 @@ def reg_and_audit_hospital(type=1):
# 医院审核接口_查询数据_开始 # 医院审核接口_查询数据_开始
# 登录 # 登录
username = commonFuc().get_business_data(module, "username") username = commonFuc().get_business_data(module, "username2")
password = commonFuc().get_business_data(module, "password1") password = commonFuc().get_business_data(module, "password")
print(username, password) print(username, password)
# 获取token和projectCode # 获取token和projectCode
token, projectCode, uxid,corpId,info = login_system(username, password).get_token() token, projectCode, uxid,corpId,info = login_system(username, password).get_token()
...@@ -79,10 +80,11 @@ def reg_and_audit_hospital(type=1): ...@@ -79,10 +80,11 @@ def reg_and_audit_hospital(type=1):
headers = commonFuc().get_business_data(module, "json_headers2", headers = commonFuc().get_business_data(module, "json_headers2",
commonFuc().get_business_data(module, "json_contentType"), token, commonFuc().get_business_data(module, "json_contentType"), token,
projectCode) projectCode)
request_body = commonFuc().get_business_data(module, "payload4", id1, now, now, h_name, uxid, h_name, h_name, h_name, request_body = commonFuc().get_business_data(module, "payload4_1", id1, now, now, h_name, uxid, h_name, h_name, h_name,
h_name, h_name, h_name, h_name, now, now, uxid) h_name, h_name, h_name, h_name, now, now)
# 发送请求 # 发送请求
result = commonFuc().http_post(url, request_body, headers) result = commonFuc().http_post(url, request_body, headers)
print('审核医院返回结果',result)
# #获取接口返回数据 # #获取接口返回数据
# code = commonFuc().analysis_json('code', result) # code = commonFuc().analysis_json('code', result)
check_dict2 = commonFuc().get_business_data(module, "checkDict2") check_dict2 = commonFuc().get_business_data(module, "checkDict2")
...@@ -90,5 +92,10 @@ def reg_and_audit_hospital(type=1): ...@@ -90,5 +92,10 @@ def reg_and_audit_hospital(type=1):
# #断言实际结果中是否包含预期结果的内容 # #断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict2, result) commonFuc().check_result(check_dict2, result)
# #===============医院注册提交接口_审核通过_结束 # #===============医院注册提交接口_审核通过_结束
#将医院信息写入到文件中
info=(h_name,h_name)
titlename=('h_id','h_name')
FileUtils().w_info4(info,module,'医院信息',titlename)
print('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
return h_name return h_name
reg_and_audit_hospital() reg_and_audit_hospital()
\ No newline at end of file
# -*- encoding=utf8 -*- # -*- encoding=utf8 -*-
from air_case.mdm_login.登录外网系统.登录外网系统 import login_system from air_case.mdm_login.登录外网系统.登录资源管控平台 import login_system
from common.timeUtils import timeUtils from common.timeUtils import timeUtils
__author__ = "xiaohesheng" __author__ = "xiaohesheng"
...@@ -29,8 +29,8 @@ print(result) ...@@ -29,8 +29,8 @@ print(result)
# 医院审核接口_查询数据_开始 # 医院审核接口_查询数据_开始
# 登录 # 登录
username = commonFuc().get_business_data(module, "username") username = commonFuc().get_business_data(module, "username2")
password = commonFuc().get_business_data(module, "password1") password = commonFuc().get_business_data(module, "password")
print(username, password) print(username, password)
# 获取token和projectCode # 获取token和projectCode
token, projectCode, uxid,corpId,info = login_system(username, password).get_token() token, projectCode, uxid,corpId,info = login_system(username, password).get_token()
......
# -*- encoding=utf8 -*- # -*- encoding=utf8 -*-
from common.fileUtls import FileUtils
__author__ = "xiaohesheng" __author__ = "xiaohesheng"
...@@ -12,12 +13,17 @@ from air_case.mdm_login.登录外网系统.登录外网系统 import login_syste ...@@ -12,12 +13,17 @@ from air_case.mdm_login.登录外网系统.登录外网系统 import login_syste
from airtest.core.api import using from airtest.core.api import using
import sys import sys
def h_login(): def h_login():
module = "mdm3_cm" module = "a4_mdm3_cm"
pro_path=commonFuc().get_pro_path() # pro_path=commonFuc().get_pro_path()
sys.path.append(pro_path+r'\\air_case\\mdm3_hs\\注册医院审核通过.air') # sys.path.append(pro_path+r'\\air_case\\mdm3_hs\\注册医院审核通过.air')
using(pro_path+r'\\air_case\\mdm3_hs\\注册医院审核通过.air') # using(pro_path+r'\\air_case\\mdm3_hs\\注册医院审核通过.air')
from 注册医院审核通过 import reg_and_audit_hospital # from 注册医院审核通过 import reg_and_audit_hospital
h_name=reg_and_audit_hospital() # h_name=reg_and_audit_hospital()
info = FileUtils().r_info("a3_mdm3_hs", "医院信息")
print(info)
h_name = info['h_name']
print(h_name)
""" """
场景:a1供货关系申请_客户类型_医院_登录_医院登录获取医院id 场景:a1供货关系申请_客户类型_医院_登录_医院登录获取医院id
用例名称:a1供货关系申请_客户类型_医院_登录_医院登录获取医院id 用例名称:a1供货关系申请_客户类型_医院_登录_医院登录获取医院id
...@@ -26,7 +32,7 @@ def h_login(): ...@@ -26,7 +32,7 @@ def h_login():
""" """
#供货关系申请_客户类型_医院_登录_医院登录获取医院id #供货关系申请_客户类型_医院_登录_医院登录获取医院id
#如果需要h0347账号登录,这里就从文件获取 #如果需要h0347账号登录,这里就从文件获取
module = "mdm3_cm" module = "a4_mdm3_cm"
username = h_name username = h_name
# print('医院名称',username) # print('医院名称',username)
password = commonFuc().get_business_data(module, "password") password = commonFuc().get_business_data(module, "password")
......
...@@ -13,12 +13,15 @@ from air_case.mdm_login.登录外网系统.登录外网系统 import login_syste ...@@ -13,12 +13,15 @@ from air_case.mdm_login.登录外网系统.登录外网系统 import login_syste
from airtest.core.api import using from airtest.core.api import using
import sys import sys
def e_login(): def e_login():
module = "mdm3_cm" module = "a4_mdm3_cm"
pro_path=commonFuc().get_pro_path() # pro_path=commonFuc().get_pro_path()
sys.path.append(pro_path+r'\\air_case\\mdm3_pim\\a8产品新增和审核通过.air') # sys.path.append(pro_path+r'\\air_case\\mdm3_pim\\a8产品新增和审核通过.air')
using(pro_path+r'\\air_case\\mdm3_pim\\a8产品新增和审核通过.air') # using(pro_path+r'\\air_case\\mdm3_pim\\a8产品新增和审核通过.air')
from a8产品新增和审核通过 import Enterprise_audit # from a8产品新增和审核通过 import Enterprise_audit
username=Enterprise_audit() # username=Enterprise_audit()
info = FileUtils().r_info("a5_mdm3_pim", "产品新增")
print(info)
username = info['username']
print('aaaaaaaaaaaaaaaaaaaaaaaaaaa',username) print('aaaaaaaaaaaaaaaaaaaaaaaaaaa',username)
""" """
场景:a2供货关系申请_客户类型_医院_登录_企业登录 场景:a2供货关系申请_客户类型_医院_登录_企业登录
......
...@@ -12,16 +12,16 @@ from common.common_func import commonFuc ...@@ -12,16 +12,16 @@ from common.common_func import commonFuc
from air_case.mdm_login.登录外网系统.登录外网系统 import login_system from air_case.mdm_login.登录外网系统.登录外网系统 import login_system
from airtest.core.api import using from airtest.core.api import using
import sys import sys
module = "mdm3_cm" module = "a4_mdm3_cm"
def supply_and_marketing_apply(): def supply_and_marketing_apply():
pro_path=commonFuc().get_pro_path() pro_path=commonFuc().get_pro_path()
sys.path.append(pro_path+r'\\air_case\\mdm3_cm\\a2供货关系申请_客户类型_医院_登录_企业登录.air') sys.path.append(pro_path+r'\\air_case\\a4_mdm3_cm\\a2供货关系申请_客户类型_医院_登录_企业登录.air')
using(pro_path+r'\\air_case\\mdm3_cm\\a2供货关系申请_客户类型_医院_登录_企业登录.air') using(pro_path+r'\\air_case\\a4_mdm3_cm\\a2供货关系申请_客户类型_医院_登录_企业登录.air')
from a2供货关系申请_客户类型_医院_登录_企业登录 import e_login from a2供货关系申请_客户类型_医院_登录_企业登录 import e_login
token,projectCode,uxid,corpId,username=e_login() token,projectCode,uxid,corpId,username=e_login()
#获取医院corpId #获取医院corpId
sys.path.append(pro_path + r'\\air_case\\mdm3_cm\\a1供货关系申请_客户类型_医院_登录_医院登录获取医院id.air') sys.path.append(pro_path + r'\\air_case\\a4_mdm3_cm\\a1供货关系申请_客户类型_医院_登录_医院登录获取医院id.air')
using(pro_path + r'\\air_case\\mdm3_cm\\a1供货关系申请_客户类型_医院_登录_医院登录获取医院id.air') using(pro_path + r'\\air_case\\a4_mdm3_cm\\a1供货关系申请_客户类型_医院_登录_医院登录获取医院id.air')
from a1供货关系申请_客户类型_医院_登录_医院登录获取医院id import h_login from a1供货关系申请_客户类型_医院_登录_医院登录获取医院id import h_login
h_token,h_projectCode,h_uxid,h_corpId,h_name=h_login() h_token,h_projectCode,h_uxid,h_corpId,h_name=h_login()
""" """
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment