Commit 2772d0fe authored by xiao-hesheng's avatar xiao-hesheng
Browse files

新增spd3.0外网注册企业接口测试脚本

parent f96691e9
# -*- encoding=utf8 -*-
__author__ = "xiaohesheng"
"""
case_tag:mdm-web,用例集id2226
主数据平台:注册企业接口
"""
from common.common_func import commonFuc
import time
module = "spd3"
#企业注册接口
import os
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "CompanyRegist_url")
print(url)
# #获取请求头信息
headers = commonFuc().get_business_data(module, "json_headers", commonFuc().get_business_data(module,"json_contentType"))
print(headers)
name=commonFuc().get_business_data(module,"name")#获取前缀name
cname=name+commonFuc().randomString(5)#随机数生成拼接企业名称
request_body = commonFuc().get_business_data(module, "payload",cname,cname,cname,cname,cname)
print(request_body)
"""
场景:外网主数据平台企业注册-器械注册人注册接口-正常注册
用例名称:企业注册接口-器械注册人-正常注册
输入:cname
输出:"rtn_msg": "返回注册企业信息"
"""
#发送请求
result = commonFuc().http_post(url, request_body, headers)
print(result)
#获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict")
# commonFuc().check_result(check_dict, result)
\ No newline at end of file
...@@ -15,6 +15,7 @@ module = "spd3" ...@@ -15,6 +15,7 @@ module = "spd3"
import os import os
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "VerifyCode_url") url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "VerifyCode_url")
print("aaaaaaaaaaaaaaaaaa"+url) print("aaaaaaaaaaaaaaaaaa"+url)
# token = commonFuc().get_token(module, "cancel_enc_user_id") # token = commonFuc().get_token(module, "cancel_enc_user_id")
# timestamp = str(int(time.time())) # timestamp = str(int(time.time()))
# payload = commonFuc().get_business_data(module, "payload") # payload = commonFuc().get_business_data(module, "payload")
......
# 登录外网(主数据平台)系统
"VerifyCode_url": "/test2api/oauthService/auth/getVerifyCode"
login_data: {"orderCode": "10200512100243412"}
login_contentType: "application/json"
login_checkDict: {"rtn_code": "0000001"}
"login_enc_user_id": "国药集团湖北分公司mQDwR7"
"login_url": "/test2api/oauthService/auth/getVerifyCode"
\ No newline at end of file
# 存储业务sql
"select_patient":
- medical
- SELECT relation_id,name,gender,id FROM `patient` where enc_user_id=%s and deleted=0;
...@@ -6,4 +6,41 @@ login_checkDict: {"rtn_code": "0000001"} ...@@ -6,4 +6,41 @@ login_checkDict: {"rtn_code": "0000001"}
"login_enc_user_id": "国药集团湖北分公司mQDwR7" "login_enc_user_id": "国药集团湖北分公司mQDwR7"
"login_url": "/test2api/oauthService/auth/getVerifyCode" "login_url": "/test2api/oauthService/auth/getVerifyCode"
\ No newline at end of file
#器械注册人接口
"CompanyRegist_url": "/test2api/mdmService/companyRegistBill/insertCompanyRegist"
json_contentType: "application/json"
json_headers: {
"Content-Type": "%s"
}
"payload": {
'compFunction': 2,
"compFunctionArr": ["2"],
"cname": "%s",
"shortName": "",
"isAbroad": "1",
"addrCodeList": [
"11"
],
"area": "",
"userName": "%s",
"address": "",
"userLoginCode": "%s",
"userLoginPsw": "a123456!",
"confimPassword": "a123456!",
"registContactUser": "",
"registContactWay": "",
"email": "%s@sina.com",
"registSourceProject": "%s",
"legal": "",
"erpCode": "002",
"dataEntrance": "注册",
"compKind": "0",
"upCompanyId": "",
"companyRegistBizscopeVos": [],
"certVOList": []
}
name:"国药集团公司"
checkDict: {"code": 0}
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
<tr width="600"> <tr width="600">
<td class="details-col-elapsed"><a href='../log/外网企业注册-器械注册人/log.html' target='_blank'>外网企业注册-器械注册人</a></td> <td class="details-col-elapsed"><a href='../log/外网企业注册-器械注册人/log.html' target='_blank'>外网企业注册-器械注册人</a></td>
<td class="success">成功</td> <td class="success">成功</td>
<td class="details-col-elapsed">0.139</td> <td class="details-col-elapsed">0.289</td>
<td class="details-col-elapsed">xiaohesheng</td> <td class="details-col-elapsed">xiaohesheng</td>
</tr> </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