Commit bdf0f2e9 authored by xiao-hesheng's avatar xiao-hesheng
Browse files

优化脚本

parent b7c49d5d
......@@ -46,7 +46,7 @@ request_body = commonFuc().get_business_data(module, "payload", corpId)
# 发送请求
result = commonFuc().http_post(url, request_body, headers)
print('实际值',result)
# print('实际值',result)
code = commonFuc().analysis_json('code', result)
data = commonFuc().analysis_json('data', result)
data = commonFuc().analysis_json('data', data)
......
......@@ -13,9 +13,9 @@ module = "mdm3_pim"
from common.common_func import commonFuc, using
from air_case.mdm_login.登录外网系统.登录外网系统 import login_system
pro_path=commonFuc().get_pro_path()
sys.path.append(pro_path+r'\\air_case\\mdm3_pim\\a分页查询供应商产品数据.air')
using(pro_path+r'\\air_case\\mdm3_pim\\a分页查询供应商产品数据.air')
from a分页查询供应商产品数据 import *
sys.path.append(pro_path+r'\\air_case\\mdm3_pim\\a1分页查询供应商产品数据.air')
using(pro_path+r'\\air_case\\mdm3_pim\\a1分页查询供应商产品数据.air')
from a1分页查询供应商产品数据 import *
"""
场景:产品信息申报
......@@ -41,10 +41,11 @@ p_name = commonFuc().get_business_data(module, "name1") # 获取前缀name
p_name = p_name + commonFuc().randomString(5) # 随机数生成拼接产品名称
request_body = commonFuc().get_business_data(module, "payload6", p_name, p_name, p_name, p_name, p_name, p_name, p_name,
p_name, p_name, p_name, p_name, p_name, p_name, p_name)
print('新增产品请求体', request_body)
# print('新增产品请求体', request_body)
# 发送请求
result = commonFuc().http_post(url, request_body, headers)
print("新增产品返回结果", result)
# print("新增产品返回结果", result)
goodsRegistVO = commonFuc().analysis_json('goodsRegistVO', result)
goodsName = commonFuc().analysis_json('goodsName', goodsRegistVO)
commonFuc().check_text_exist(goodsName, result) # 检查返回结果中是否存在新增的产品名称
\ No newline at end of file
commonFuc().check_text_exist(goodsName, result) # 检查返回结果中是否存在新增的产品名称
global_var_p_name=p_name
\ No newline at end of file
# -*- encoding=utf8 -*-
from common.timeUtils import timeUtils
from common.fileUtls import FileUtils
import sys
__author__ = "xiaohesheng"
"""
case_tag:api,mdm-web,产品信息审核查询,id2251,id2251-3,sit,on,2023091201
主数据平台:产品信息审核查询
"""
module = "mdm3_pim"
from common.common_func import commonFuc, using
from air_case.mdm_login.登录外网系统.登录外网系统 import login_system
pro_path=commonFuc().get_pro_path()
# sys.path.append(pro_path+r'\\air_case\\mdm3_pim\\a1分页查询供应商产品数据.air')
# using(pro_path+r'\\air_case\\mdm3_pim\\a1分页查询供应商产品数据.air')
# from a1分页查询供应商产品数据 import *
sys.path.append(pro_path+r'\\air_case\\mdm3_pim\\a2产品信息申报.air')
using(pro_path+r'\\air_case\\mdm3_pim\\a2产品信息申报.air')
from a2产品信息申报 import *
"""
场景:产品信息审核查询
用例名称:产品信息审核查询
输入:CRid
输出:"rtn_msg": "ok"
"""
# 登录
username = global_var_cname
password = commonFuc().get_business_data(module, "password")
print(username, password)
# 获取token和projectCode
token, projectCode, uxid, corpId,info = login_system(username, password).get_token()
# 产品信息审核查询
module = "mdm3_pim"
# 产品信息审核查询
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "listAuditBillByPage_url")
# 获取请求头信息
headers = commonFuc().get_business_data(module, "json_headers2",
commonFuc().get_business_data(module, "json_contentType"), token,
projectCode)
p_name = global_var_p_name
request_body = commonFuc().get_business_data(module, "payload7",p_name)
# print('产品信息审核查询请求体', request_body)
# 发送请求
result = commonFuc().http_post(url, request_body, headers)
# print("产品信息审核查询返回结果", result)
data = commonFuc().analysis_json('data', result)
total=commonFuc().analysis_json('total', data)
GRBid = commonFuc().analysis_json('id', data)
global_var_GRBid=GRBid
if total==1:
commonFuc().check_text_exist(p_name, result)
data = commonFuc().analysis_json('data', result)
else:
commonFuc().check_text_exist(p_name+'error', result)
# -*- encoding=utf8 -*-
from common.timeUtils import timeUtils
from common.fileUtls import FileUtils
import sys
__author__ = "xiaohesheng"
"""
case_tag:api,mdm-web,产品信息审核锁定,id2251,id2251-4,sit,on
主数据平台:产品信息审核锁定
"""
module = "mdm3_pim"
from common.common_func import commonFuc, using
from air_case.mdm_login.登录外网系统.登录外网系统 import login_system
pro_path=commonFuc().get_pro_path()
sys.path.append(pro_path+r'\\air_case\\mdm3_pim\\a3产品信息审核_查询.air')
using(pro_path+r'\\air_case\\mdm3_pim\\a3产品信息审核_查询.air')
from a3产品信息审核_查询 import *
"""
场景:产品信息审核锁定
用例名称:产品信息审核锁定
输入:CRid
输出:"rtn_msg": "ok"
"""
# 登录
username = global_var_cname
password = commonFuc().get_business_data(module, "password")
print(username, password)
# 获取token和projectCode
token, projectCode, uxid, corpId,info = login_system(username, password).get_token()
# 产品信息审核查询
module = "mdm3_pim"
# 产品信息审核查询
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "updateById_url2")
# 获取请求头信息
headers = commonFuc().get_business_data(module, "json_headers2",
commonFuc().get_business_data(module, "json_contentType"), token,
projectCode)
now = timeUtils().get_time_hms()
GRBid=global_var_GRBid
request_body = commonFuc().get_business_data(module, "payload8", GRBid, uxid, now)
# 发送请求
result = commonFuc().http_post(url, request_body, headers)
# print('锁定结果',result)
checkDict3=commonFuc().get_business_data(module,"checkDict3")
commonFuc().check_result(checkDict3,result)
\ No newline at end of file
......@@ -5,11 +5,11 @@
"checkHosRegistInfo_url": "/test2api/mdmService/companyRegistBill/checkHosRegistInfo"
"submitGoodsRegist_url": "/test2api/mdmService/goodsRegistBill/submitGoodsRegist"
"listAuditBillByPage_url": "/test2api/mdmService/goodsRegistBill/listAuditBillByPage"
"updateById_url2": "/test2api/mdmService/goodsRegistBill/updateById"
"updateById_url2": "/test2api/mdmService/goodsRegistBill/updateById/"
"getGoodsRegistBillDetail_url": "/test2api/mdmService/goodsRegistBill/getGoodsRegistBillDetail/"
"handleAuditGoodsRegist_url": "/test2api/mdmService/goodsRegistBill/handleAuditGoodsRegist/"
"submitGoodsSpecsRegist_url": "/test2api/mdmService/goodsRegistBill/submitGoodsSpecsRegist/"
"listAuditBillByPage_url": "/test2api/mdmService/goodsRegistBill/listAuditBillByPage/"
"username": "1679886114521"
"password": "a123456!"
......@@ -356,3 +356,5 @@ json_headers2: {
checkDict: {"code": 0, "msg":None,"data": {"pageNum": 1, "pageSize": 20, "total": 0, "data": [], "totalInfo": None}}
checkDict1: {"code": -2,"msg": "医院已被注册,请耐心等待审核通知!", "data": None}
checkDict2: {'code': 0, 'msg': None, 'data': 'success'}
checkDict3: {'code': 0, 'msg': None, 'data': 1}
......@@ -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分2</td>
<td class='details-col-elapsed'>0分4</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/b器械注册人_审核通过/log.html' target='_blank'>b器械注册人_审核通过</a></td>
<td class="details-col-elapsed"><a href='../log/a4产品信息审核_锁定/log.html' target='_blank'>a4产品信息审核_锁定</a></td>
<td class="success">成功</td>
<td class="details-col-elapsed">2.065</td>
<td class="details-col-elapsed">4.536</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