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

增加配送模块脚本

parent 2920cea5
......@@ -37,7 +37,7 @@ def select1():
commonFuc().get_business_data(module, "json_contentType"), token,
projectCode)
goodsname = commonFuc().randomString(5)
request_body = commonFuc().get_business_data(module, "payload8")
request_body = commonFuc().get_business_data(module, "payload9")
# request_body = commonFuc().get_business_data(module, "payload10_1")
# print('request_body',request_body)
......
# -*- encoding=utf8 -*-
from common.fileUtls import FileUtils
__author__ = "xiaohesheng"
"""
case_tag:api,mdm-web,a6_9代配送下单列表数据查询_待配送查询2,id2291,id2291-32,sit,on
主数据平台:a6_9代配送下单列表数据查询_待配送查询2
"""
from common.common_func import commonFuc
from airtest.core.api import using
import sys
module = "a6_mdm3_dp"
def select1():
pro_path = commonFuc().get_pro_path()
sys.path.append(pro_path + r'\\air_case\\a6_mdm3_dp\\a1企业登录.air')
using(pro_path + r'\\air_case\\a6_mdm3_dp\\a1企业登录.air')
from a1企业登录 import e_login
token, projectCode, uxid, corpId, e_name = e_login()
# # 获取医院corpId
# sys.path.append(pro_path + r'\\air_case\\a4_mdm3_cm\\a1供货关系申请_客户类型_医院_登录_医院登录获取医院id.air')
# using(pro_path + r'\\air_case\\a4_mdm3_cm\\a1供货关系申请_客户类型_医院_登录_医院登录获取医院id.air')
# from a1供货关系申请_客户类型_医院_登录_医院登录获取医院id import h_login
# h_token, h_projectCode, h_uxid, h_corpId, h_name = h_login()
"""
场景:a6_9代配送下单列表数据查询_待配送查询2
用例名称:a6_9代配送下单列表数据查询_待配送查询2
输入:无
输出:"rtn_msg": 0
"""
module = "a6_mdm3_dp"
#a6_4代配送下单列表数据查询_待确认查询3
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "purchase_page_url")
# 获取请求头信息
headers = commonFuc().get_business_data(module, "json_headers2",
commonFuc().get_business_data(module, "json_contentType"), token,
projectCode)
goodsname = commonFuc().randomString(5)
request_body = commonFuc().get_business_data(module, "payload9_1")
# request_body = commonFuc().get_business_data(module, "payload10_1")
# 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)
data1=commonFuc().analysis_json('data',data)
if code==0 and total>=1:
id1 = commonFuc().analysis_json('id', data1[0])
print(id1)
id2 = commonFuc().analysis_json('id', data1[1])
print(id2)
commonFuc().check_text_exist(code, result)
return id1, id2
else:
commonFuc().check_text_exist('error', result)
select1()
......@@ -84,6 +84,8 @@ json_headers2: {
"payload8": {"pageNum":1,"pageSize":50,"orderBy":"last_modified desc, order_no desc","queryObject":{"dateValue":["",""],"provId":"p10d95","pageType":2,"hosIdList":["h0347"],"tabIdx":"1","startDate":"","endDate":""}}
"payload8_1": {"pageNum":1,"pageSize":50,"orderBy":"last_modified desc, order_no desc","queryObject":{"dateValue":["",""],"provId":"p10d95","pageType":2,"hosIdList":["h0028"],"tabIdx":"1","startDate":"","endDate":""}}
"payload2_1": {"id":"%s","version":2,"hosVersion":2,"userId":"%s","detailList":[]}
"payload9": {"pageNum":1,"pageSize":50,"orderBy":"last_modified desc, order_no desc","queryObject":{"dateValue":["",""],"hosId":"h0347","orderNo":"","provId":"p10d95","pageType":2,"tabIdx":"2","startDate":"","endDate":""}}
"payload9_1": {"pageNum":1,"pageSize":50,"orderBy":"last_modified desc, order_no desc","queryObject":{"dateValue":["",""],"hosId":"h0028","orderNo":"","provId":"p10d95","pageType":2,"tabIdx":"2","startDate":"","endDate":""}}
checkDict: {'code': 0, 'msg': None, 'tag': None, 'data': 0}
checkDict1: {'code': 1100000, 'msg': '暂时没有定义异码,中文描述为:审核失败', 'tag': '/mdmService:gyqx.spd.mdm.access.service.impl.Supply
......
......@@ -72,9 +72,9 @@
</tr>
<tr width="600">
<td class="details-col-elapsed"><a href='../log/a6_7代配送下单列表数据查询_单条记录确认_2_0医院/log.html' target='_blank'>a6_7代配送下单列表数据查询_单条记录确认_2_0医院</a></td>
<td class="details-col-elapsed"><a href='../log/a6_9代配送下单列表数据查询_待配送查询2/log.html' target='_blank'>a6_9代配送下单列表数据查询_待配送查询2</a></td>
<td class="success">成功</td>
<td class="details-col-elapsed">4.805</td>
<td class="details-col-elapsed">4.025</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