Commit 81e8545d authored by xiao-hesheng's avatar xiao-hesheng
Browse files

新增带量采购目录脚本

parent 780244a7
......@@ -19,8 +19,8 @@ import sys
def test1():
module = "b3_herp3_purchase"
"""
场景:a_m8_手术通知单_列表查询_条件查询_制单时间
用例名称:a_m8_手术通知单_列表查询_条件查询_制单时间
场景:a_m9_手术通知单_列表查询_条件查询_状态
用例名称:a_m9_手术通知单_列表查询_条件查询_状态
输入:无
输出:"rtn_msg": {"code": 0, "msg": null, "data": true}
"""
......
# -*- encoding=utf8 -*-
from common.db.sql.sql_del_branch_info import delData
from common.fileUtls import FileUtils
from common.timeUtils import timeUtils
__author__ = "xiaohesheng"
"""
case_tag:api,herp-web,a_n0_手术通知单_列表查询_条件查询_模糊查询_通知单号,id2297,id2297-130,sit,on
内网:a_n0_手术通知单_列表查询_条件查询_模糊查询_通知单号
"""
from common.common_func import commonFuc
from air_case.b1_herp3_login.登录内网系统.登录内网系统 import login_system
from airtest.core.api import using
import sys
def test1():
module = "b3_herp3_purchase"
"""
场景:a_n0_手术通知单_列表查询_条件查询_模糊查询_通知单号
用例名称:a_n0_手术通知单_列表查询_条件查询_模糊查询_通知单号
输入:无
输出:"rtn_msg": {"code": 0, "msg": null, "data": true}
"""
# 内网登录
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)
#
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "herpService_operationNotice_url")
print(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"))
print('headers', headers)
# 从文件中获取院区id
branchId = commonFuc().get_business_data(module, 'branchId')
# # #获取日期
date1 = timeUtils().get_time_hms(5)
date2 = timeUtils().get_time_add(-180, 2)
# print(date1,date2)
# 从文件中获取通知单号
info = FileUtils().r_info8(module, "手术通知单信息", 'message8')
# print('info', info)
list_a = info['list_a']
# print('list_a', list_a)
orderNo = 'orderNo'
for i in list_a:
orderNo = i['orderNo']
break
list2 = commonFuc().get_str(orderNo)
for i in list2:
# # 请求体
request_body = commonFuc().get_business_data(module, "payload23_1", i, date2, date1, branchId)
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 total >= 0:
commonFuc().check_text_exist(0, result)
else:
commonFuc().check_text_exist('error', result)
test1()
# -*- encoding=utf8 -*-
from common.db.sql.sql_del_branch_info import delData
from common.fileUtls import FileUtils
from common.timeUtils import timeUtils
__author__ = "xiaohesheng"
"""
case_tag:api,herp-web,a_n1_手术通知单_列表查询_条件查询_模糊查询_手术申请单号,id2297,id2297-131,sit,on
内网:a_n1_手术通知单_列表查询_条件查询_模糊查询_手术申请单号
"""
from common.common_func import commonFuc
from air_case.b1_herp3_login.登录内网系统.登录内网系统 import login_system
from airtest.core.api import using
import sys
def test1():
module = "b3_herp3_purchase"
"""
场景:a_n1_手术通知单_列表查询_条件查询_模糊查询_手术申请单号
用例名称:a_n1_手术通知单_列表查询_条件查询_模糊查询_手术申请单号
输入:无
输出:"rtn_msg": {"code": 0, "msg": null, "data": true}
"""
# 内网登录
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)
#
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "herpService_operationNotice_url")
print(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"))
print('headers', headers)
# 从文件中获取院区id
branchId = commonFuc().get_business_data(module, 'branchId')
# # #获取日期
date1 = timeUtils().get_time_hms(5)
date2 = timeUtils().get_time_add(-180, 2)
# print(date1,date2)
# 从文件中获取通知单号
info = FileUtils().r_info8(module, "手术通知单信息", 'message8')
# print('info', info)
list_a = info['list_a']
# print('list_a', list_a)
orderNo = 'orderNo'
sourceOrderNo = 'sourceOrderNo'
for i in list_a:
orderNo = i['orderNo']
sourceOrderNo = i['sourceOrderNo']
break
list2 = commonFuc().get_str(sourceOrderNo)
for i in list2:
# # 请求体
request_body = commonFuc().get_business_data(module, "payload23_2", orderNo,i, date2, date1, branchId)
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 total >= 0:
commonFuc().check_text_exist(0, result)
else:
commonFuc().check_text_exist('error', result)
test1()
# -*- encoding=utf8 -*-
from common.db.sql.sql_del_branch_info import delData
from common.fileUtls import FileUtils
from common.timeUtils import timeUtils
__author__ = "xiaohesheng"
"""
case_tag:api,herp-web,a_n2_手术通知单_列表查询_条件查询_模糊查询_进院供应商,id2297,id2297-132,sit,on
内网:a_n2_手术通知单_列表查询_条件查询_模糊查询_进院供应商
"""
from common.common_func import commonFuc
from air_case.b1_herp3_login.登录内网系统.登录内网系统 import login_system
from airtest.core.api import using
import sys
def test1():
module = "b3_herp3_purchase"
"""
场景:a_n2_手术通知单_列表查询_条件查询_模糊查询_进院供应商
用例名称:a_n2_手术通知单_列表查询_条件查询_模糊查询_进院供应商
输入:无
输出:"rtn_msg": {"code": 0, "msg": null, "data": true}
"""
# 内网登录
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)
#
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "herpService_operationNotice_url")
print(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"))
print('headers', headers)
# 从文件中获取院区id
branchId = commonFuc().get_business_data(module, 'branchId')
# # #获取日期
date1 = timeUtils().get_time_hms(5)
date2 = timeUtils().get_time_add(-180, 2)
# print(date1,date2)
# 从文件中获取手术申请单号
info = FileUtils().r_info8(module, "手术通知单信息", 'message8')
# print('info', info)
list_a = info['list_a']
# print('list_a', list_a)
orderNo = 'orderNo'
sourceOrderNo = 'sourceOrderNo'
provName='provName'
for i in list_a:
orderNo = i['orderNo']
sourceOrderNo = i['sourceOrderNo']
provName=i['provName']
break
list2=commonFuc().get_str(provName)
for i in list2:
##请求体
request_body = commonFuc().get_business_data(module, "payload23_3", orderNo, i,sourceOrderNo, date2, date1, branchId)
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 total >= 1:
commonFuc().check_text_exist(0, result)
else:
commonFuc().check_text_exist('error', result)
test1()
# -*- encoding=utf8 -*-
from common.db.sql.sql_del_branch_info import delData
from common.fileUtls import FileUtils
from common.timeUtils import timeUtils
__author__ = "xiaohesheng"
"""
case_tag:api,herp-web,a_n3_手术通知单_列表查询_条件查询_异常查询_通知单号,id2297,id2297-133,sit,on
内网:a_n3_手术通知单_列表查询_条件查询_异常查询_通知单号
"""
from common.common_func import commonFuc
from air_case.b1_herp3_login.登录内网系统.登录内网系统 import login_system
from airtest.core.api import using
import sys
def test1():
module = "b3_herp3_purchase"
"""
场景:a_n3_手术通知单_列表查询_条件查询_异常查询_通知单号
用例名称:a_n3_手术通知单_列表查询_条件查询_异常查询_通知单号
输入:无
输出:"rtn_msg": {"code": 0, "msg": null, "data": true}
"""
# 内网登录
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)
#
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "herpService_operationNotice_url")
print(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"))
print('headers', headers)
# 从文件中获取院区id
branchId = commonFuc().get_business_data(module, 'branchId')
# # #获取日期
date1 = timeUtils().get_time_hms(5)
date2 = timeUtils().get_time_add(-180, 2)
# print(date1,date2)
# 从文件中获取通知单号
info = FileUtils().r_info8(module, "手术通知单信息", 'message8')
# print('info', info)
list_a = info['list_a']
# print('list_a', list_a)
orderNo = 'orderNo'
for i in list_a:
orderNo = i['orderNo']
break
str = commonFuc().get_business_data(module, 'data3')
list2 = list(str.split(","))
for i in list2:
# # 请求体
request_body = commonFuc().get_business_data(module, "payload23_1", i, date2, date1, branchId)
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 total == 0:
commonFuc().check_text_exist(0, result)
else:
commonFuc().check_text_exist('error', result)
test1()
# -*- encoding=utf8 -*-
from common.db.sql.sql_del_branch_info import delData
from common.fileUtls import FileUtils
from common.timeUtils import timeUtils
__author__ = "xiaohesheng"
"""
case_tag:api,herp-web,a_n4_手术通知单_列表查询_条件查询_异常查询_手术申请单号,id2297,id2297-134,sit,on
内网:a_n4_手术通知单_列表查询_条件查询_异常查询_手术申请单号
"""
from common.common_func import commonFuc
from air_case.b1_herp3_login.登录内网系统.登录内网系统 import login_system
from airtest.core.api import using
import sys
def test1():
module = "b3_herp3_purchase"
"""
场景:a_n4_手术通知单_列表查询_条件查询_异常查询_手术申请单号
用例名称:a_n4_手术通知单_列表查询_条件查询_异常查询_手术申请单号
输入:无
输出:"rtn_msg": {"code": 0, "msg": null, "data": true}
"""
# 内网登录
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)
#
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "herpService_operationNotice_url")
print(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"))
print('headers', headers)
# 从文件中获取院区id
branchId = commonFuc().get_business_data(module, 'branchId')
# # #获取日期
date1 = timeUtils().get_time_hms(5)
date2 = timeUtils().get_time_add(-180, 2)
# print(date1,date2)
# 从文件中获取通知单号
info = FileUtils().r_info8(module, "手术通知单信息", 'message8')
# print('info', info)
list_a = info['list_a']
# print('list_a', list_a)
orderNo = 'orderNo'
sourceOrderNo = 'sourceOrderNo'
for i in list_a:
orderNo = i['orderNo']
sourceOrderNo = i['sourceOrderNo']
break
str = commonFuc().get_business_data(module, 'data3')
list2 = list(str.split(","))
for i in list2:
# # 请求体
request_body = commonFuc().get_business_data(module, "payload23_2", orderNo,i, date2, date1, branchId)
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 total == 0:
commonFuc().check_text_exist(0, result)
else:
commonFuc().check_text_exist('error', result)
test1()
# -*- encoding=utf8 -*-
from common.db.sql.sql_del_branch_info import delData
from common.fileUtls import FileUtils
from common.timeUtils import timeUtils
__author__ = "xiaohesheng"
"""
case_tag:api,herp-web,a_n5_手术通知单_列表查询_条件查询_异常查询_进院供应商,id2297,id2297-135,sit,on
内网:a_n5_手术通知单_列表查询_条件查询_异常查询_进院供应商
"""
from common.common_func import commonFuc
from air_case.b1_herp3_login.登录内网系统.登录内网系统 import login_system
from airtest.core.api import using
import sys
def test1():
module = "b3_herp3_purchase"
"""
场景:a_n5_手术通知单_列表查询_条件查询_异常查询_进院供应商
用例名称:a_n5_手术通知单_列表查询_条件查询_异常查询_进院供应商
输入:无
输出:"rtn_msg": {"code": 0, "msg": null, "data": true}
"""
# 内网登录
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)
#
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "herpService_operationNotice_url")
print(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"))
print('headers', headers)
# 从文件中获取院区id
branchId = commonFuc().get_business_data(module, 'branchId')
# # #获取日期
date1 = timeUtils().get_time_hms(5)
date2 = timeUtils().get_time_add(-180, 2)
# print(date1,date2)
# 从文件中获取手术申请单号
info = FileUtils().r_info8(module, "手术通知单信息", 'message8')
# print('info', info)
list_a = info['list_a']
# print('list_a', list_a)
orderNo = 'orderNo'
sourceOrderNo = 'sourceOrderNo'
provName='provName'
for i in list_a:
orderNo = i['orderNo']
sourceOrderNo = i['sourceOrderNo']
provName=i['provName']
break
str = commonFuc().get_business_data(module, 'data3')
list2 = list(str.split(","))
for i in list2:
##请求体
request_body = commonFuc().get_business_data(module, "payload23_3", orderNo, i,sourceOrderNo, date2, date1, branchId)
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 total == 0:
commonFuc().check_text_exist(0, result)
else:
commonFuc().check_text_exist('error', result)
test1()
......@@ -72,9 +72,9 @@
</tr>
<tr width="600">
<td class="details-col-elapsed"><a href='../log/a_m9_手术通知单_列表查询_条件查询_状态/log.html' target='_blank'>a_m9_手术通知单_列表查询_条件查询_状态</a></td>
<td class="details-col-elapsed"><a href='../log/a_n5_手术通知单_列表查询_条件查询_异常查询_进院供应商/log.html' target='_blank'>a_n5_手术通知单_列表查询_条件查询_异常查询_进院供应商</a></td>
<td class="success">成功</td>
<td class="details-col-elapsed">2.03</td>
<td class="details-col-elapsed">2.228</td>
<td class="details-col-elapsed">xiaohesheng</td>
</tr>
......
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