Commit 2c951f6c authored by xiao-hesheng's avatar xiao-hesheng
Browse files

优化脚本

No related merge requests found
Showing with 288 additions and 11 deletions
+288 -11
......@@ -54,7 +54,7 @@ def select1():
commonFuc().check_text_exist('00001977', result)
else:
commonFuc().check_text_exist('error', result)
# check_dict=commonFuc().get_business_data(module,'checkDict4')
# commonFuc().check_result(check_dict,result)
check_dict=commonFuc().get_business_data(module,'checkDict4')
commonFuc().check_result(check_dict,result)
select1()
......@@ -41,7 +41,7 @@ def test1():
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
# # 获取id
pro_path = commonFuc().get_pro_path()
sys.path.append(pro_path + r'\\air_case\\b2_herp3_bs\\g7_批量导入_查询产品信息.air')
using(pro_path + r'\\air_case\\b2_herp3_bs\\g7_批量导入_查询产品信息.air')
......
......@@ -41,7 +41,7 @@ def test1():
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
# # 获取id
pro_path = commonFuc().get_pro_path()
sys.path.append(pro_path + r'\\air_case\\b2_herp3_bs\\g7_批量导入_查询产品信息.air')
using(pro_path + r'\\air_case\\b2_herp3_bs\\g7_批量导入_查询产品信息.air')
......
......@@ -41,7 +41,7 @@ def test1():
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
# # 获取id
pro_path = commonFuc().get_pro_path()
sys.path.append(pro_path + r'\\air_case\\b2_herp3_bs\\g7_批量导入_查询产品信息.air')
using(pro_path + r'\\air_case\\b2_herp3_bs\\g7_批量导入_查询产品信息.air')
......
......@@ -41,7 +41,7 @@ def test1():
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
# # id
pro_path = commonFuc().get_pro_path()
sys.path.append(pro_path + r'\\air_case\\b2_herp3_bs\\g7_批量导入_查询产品信息.air')
using(pro_path + r'\\air_case\\b2_herp3_bs\\g7_批量导入_查询产品信息.air')
......
# -*- 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,g8_5调价管理列表_查询,id2263,id2263-73,sit,on
内网:g8_5调价管理列表_查询
"""
from common.common_func import commonFuc
from air_case.b1_herp3_login.登录内网系统.登录内网系统 import login_system
module = "b2_herp3_bs"
def test1():
"""
场景:g8_5调价管理列表_查询
用例名称:g8_5调价管理列表_查询
输入:无
输出:"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)
#g8_5调价管理列表_查询
url=commonFuc().get_api_url()+commonFuc().get_business_data(module, "pricePage_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, "payload50")
print(request_body)
# # # 发送请求
result = commonFuc().http_post(url, request_body, headers)
print('resultaaaaaaaaaaaaaaaaaaaaaaaaaaa', result)
#断言
# checkDict=commonFuc().get_business_data(module,'checkDict10')
# commonFuc().check_result(checkDict,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:
# print(code)
commonFuc().check_text_exist(0, result)
else:
commonFuc().check_text_exist('error', result)
test1()
# -*- 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,g8_7添加产品列表_确定添加产品,id2263,id2263-74,sit,on
内网:g8_7添加产品列表_确定添加产品
"""
from common.common_func import commonFuc
from air_case.b1_herp3_login.登录内网系统.登录内网系统 import login_system
module = "b2_herp3_bs"
def select1():
"""
场景:g8_7添加产品列表_确定添加产品
用例名称:g8_7添加产品列表_确定添加产品
输入:无
输出:"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)
#g8_7添加产品列表_确定添加产品
url=commonFuc().get_api_url()+commonFuc().get_business_data(module, "supplyHosGoodsPage_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, "payload50_1")
print(request_body)
# # # 发送请求
result = commonFuc().http_post(url, request_body, headers)
print('resultaaaaaaaaaaaaaaaaaaaaaaaaaaa', result)
#断言
# checkDict=commonFuc().get_business_data(module,'checkDict10')
# commonFuc().check_result(checkDict,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:
# print(code)
commonFuc().check_text_exist('一次性使用Y型连接器套件', result)
commonFuc().check_text_exist(0, result)
data1=commonFuc().analysis_json('data',data)
hosGoodsId=commonFuc().analysis_json('hosGoodsId', data1[0])
provGoodsId=commonFuc().analysis_json('provGoodsId', data1[0])
print(hosGoodsId,provGoodsId)
return hosGoodsId,provGoodsId
else:
commonFuc().check_text_exist('error', result)
select1()
# -*- 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,g8_7添加产品列表_确定添加产品,id2263,id2263-75,sit,on
内网:g8_7添加产品列表_确定添加产品
"""
from common.common_func import commonFuc
from air_case.b1_herp3_login.登录内网系统.登录内网系统 import login_system
module = "b2_herp3_bs"
def test1():
"""
场景:g8_7添加产品列表_确定添加产品
用例名称:g8_7添加产品列表_确定添加产品
输入:无
输出:"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)
#g8_7添加产品列表_确定添加产品
url=commonFuc().get_api_url()+commonFuc().get_business_data(module, "queryInSettlementStockQty_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"))
# # 获取hosGoodsId
pro_path = commonFuc().get_pro_path()
sys.path.append(pro_path + r'\\air_case\\b2_herp3_bs\\g8_6添加产品列表_查询.air')
using(pro_path + r'\\air_case\\b2_herp3_bs\\g8_6添加产品列表_查询.air')
from g8_6添加产品列表_查询 import select1
hosGoodsId,provGoodsId = select1()
# #请求体
request_body = commonFuc().get_business_data(module, "payload50_2",hosGoodsId)
print(request_body)
# # # 发送请求
result = commonFuc().http_post(url, request_body, headers)
print('resultaaaaaaaaaaaaaaaaaaaaaaaaaaa', result)
#断言
# checkDict=commonFuc().get_business_data(module,'checkDict10')
# commonFuc().check_result(checkDict,result)
code=commonFuc().analysis_json('code',result)
data=commonFuc().analysis_json('data',result)
hosGoodsInd=commonFuc().analysis_json('hosGoodsInd',data)
if code>=0 :
# print(code)
commonFuc().check_text_exist(hosGoodsId, result)
commonFuc().check_text_exist(0, result)
else:
commonFuc().check_text_exist('error', result)
test1()
# -*- encoding=utf8 -*-
import sys
from airtest.core.helper import using
from common.dateUtils import dateUtils
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,g8_8修改产品价格_暂存,id2263,id2263-76,sit,on
内网:g8_8修改产品价格_暂存
"""
from common.common_func import commonFuc
from air_case.b1_herp3_login.登录内网系统.登录内网系统 import login_system
module = "b2_herp3_bs"
def test1():
"""
场景:g8_8修改产品价格_暂存
用例名称:g8_8修改产品价格_暂存
输入:无
输出:"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)
#g8_8修改产品价格_暂存
url=commonFuc().get_api_url()+commonFuc().get_business_data(module, "goodsChgMain_insert_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"))
# # 获取hosGoodsId
pro_path = commonFuc().get_pro_path()
sys.path.append(pro_path + r'\\air_case\\b2_herp3_bs\\g8_6添加产品列表_查询.air')
using(pro_path + r'\\air_case\\b2_herp3_bs\\g8_6添加产品列表_查询.air')
from g8_6添加产品列表_查询 import select1
hosGoodsId,provGoodsId = select1()
#获取日期
currentdate=dateUtils().get_current_date()
# print(currentdate)
#请求体
request_body = commonFuc().get_business_data(module, "payload50_3",hosGoodsId,provGoodsId,currentdate)
print(request_body)
# # # 发送请求
result = commonFuc().http_post(url, request_body, headers)
print('resultaaaaaaaaaaaaaaaaaaaaaaaaaaa', result)
#断言
# checkDict=commonFuc().get_business_data(module,'checkDict10')
# commonFuc().check_result(checkDict,result)
code=commonFuc().analysis_json('code',result)
data=commonFuc().analysis_json('data',result)
checkDict=commonFuc().get_business_data(module,'checkDict10')
if code>=0 :
print(code)
commonFuc().check_text_exist(0, result)
commonFuc().check_result(checkDict,result)
else:
commonFuc().check_text_exist('error', result)
test1()
......@@ -29,7 +29,10 @@
"branchGoodsPkgDef_update_url": "/hospitaltest2api/herpService/branchGoodsPkgDef/updateById"
"updateSettleType_url": "/hospitaltest2api/herpService/basic/mcmsBranchGoodsInfo/updateSettleType"
"updateSettleType_url1": "/hospitaltest2api/herpService/supplyProvHosGoods/updateSettleType"
"pricePage_url": "/hospitaltest2api/herpService/goodsChgMain/pricePage"
"supplyHosGoodsPage_url": "/hospitaltest2api/herpService/goodsChgMain/supplyHosGoodsPage"
"queryInSettlementStockQty_url": "/hospitaltest2api/herpService/goodsChgSub/queryInSettlementStockQty"
"goodsChgMain_insert_url": "/hospitaltest2api/herpService/goodsChgMain/insert"
"username": "xhs1009"
"password": "1qaz!QAZ"
......@@ -230,7 +233,10 @@ json_headers2: {
"payload49_8": {"ids":["%s"],"settleType":2,"opMenu":"/platform/settle/rules"}
"payload49_9": {"ids":["%s"],"settleType":3,"opMenu":"/platform/settle/rules"}
"payload49_10": {"ids":["%s"],"settleType":5,"opMenu":"/platform/settle/rules"}
"payload50": {"pageNum":1,"pageSize":50,"orderBy":"mgcm.create_time desc","queryObject":{"startDate":null,"endDate":null,"goodsName":"","hosId":"h0347"}}
"payload50_1": {"queryObject":{"provId":"p10d95","hosId":"h0347","subProvId":"p10d95","goodsMfrsName":"","goodsName":"","sphgIds":[]},"pageNum":1,"pageSize":50}
"payload50_2": {"hosGoodsIds": ["%s"],"hosId": "h0347"}
"payload50_3": {"attachments":[{"fileName":"","filePath":""}],"changeDetails":[{"hosGoodsId":"%s","newValue":2659,"oldValue":2658,"supplyProvId":"%s"}],"chgType":"GOODS_COLLECT_CHANGE_PRICE","provId":"p10d95","subProvId":"p10d95","hosId":"h0347","planEffectiveDate":"%s 00:00:00","remark":"","id":"","submit":false}
checkDict: {"code": 0,'msg': None,'data': True}
checkDict1: {
......
......@@ -56,7 +56,7 @@
<tr width="600">
<td class='details-col-elapsed'>1</td>
<td class='details-col-elapsed'>1</td>
<td class='details-col-elapsed'>0分10</td>
<td class='details-col-elapsed'>0分2</td>
<td class="details-col-elapsed">100.0%</td>
</tr>
</table>
......@@ -72,9 +72,9 @@
</tr>
<tr width="600">
<td class="details-col-elapsed"><a href='../log/a3订单配送提交_3_0医院/log.html' target='_blank'>a3订单配送提交_3_0医院</a></td>
<td class="details-col-elapsed"><a href='../log/g8_7添加产品列表_确定添加产品/log.html' target='_blank'>g8_7添加产品列表_确定添加产品</a></td>
<td class="success">成功</td>
<td class="details-col-elapsed">9.917</td>
<td class="details-col-elapsed">2.508</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