Commit 595eeadb authored by liguangyu06's avatar liguangyu06
Browse files

Merge remote-tracking branch 'origin/master'

parents 854ca0fc 491481e1
......@@ -17,11 +17,11 @@ url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "Company
print(url)
# #获取请求头信息
headers = commonFuc().get_business_data(module, "json_headers", commonFuc().get_business_data(module,"json_contentType"))
print(headers)
# print(headers)
name=commonFuc().get_business_data(module,"name1")#获取前缀name
cname=name+commonFuc().randomString(5)#随机数生成拼接企业名称
request_body = commonFuc().get_business_data(module, "payload3",cname,cname,cname,cname,cname,cname)
print(request_body)
# print(request_body)
"""
场景:外网主数据平台企业注册-器械注册人注册接口-境内企业
用例名称:企业注册接口-器械注册人-正常注册-境内企业
......
# -*- encoding=utf8 -*-
from air_case.mdm_login.登录外网系统.登录外网系统 import login_system
from common.common_func import commonFuc
from common.timeUtils import timeUtils
from common.fileUtls import FileUtils
import sys
__author__ = "xiaohesheng"
"""
case_tag:api,mdm-web,查询器械注册人,id2254,id2254-1,sit,on
主数据平台:查询器械注册人
"""
module = "mdm3_ir"
"""
场景:查询器械注册人
用例名称:查询器械注册人
输入:name
输出:"rtn_msg": "ok"
"""
# 登录
username = commonFuc().get_business_data(module, "username")
password = commonFuc().get_business_data(module, "password")
print(username, password)
# 获取token和projectCode
token, projectCode, uxid, corpId,info = login_system(username, password).get_token()
# 查询器械注册人
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "listVoPage_url")
print(url)
# 获取请求头信息
headers = commonFuc().get_business_data(module, "json_headers2",
commonFuc().get_business_data(module, "json_contentType"), token,
projectCode)
request_body = commonFuc().get_business_data(module, "payload", corpId)
# 发送请求
result = commonFuc().http_post(url, request_body, headers)
print('实际值',result)
total=commonFuc().analysis_json('total',commonFuc().analysis_json('data',result))
code=commonFuc().analysis_json('code',commonFuc().analysis_json('data',result))
data=commonFuc().analysis_json('data',commonFuc().analysis_json('data',result))
id1=commonFuc().analysis_json('id',data)
# 断言实际结果中是否包含预期结果的内容
if total>=0:
commonFuc().check_text_exist(code, result) # 检查验证码
else:
commonFuc().check_text_exist(-1, result)
# global_var_id = id1
\ No newline at end of file
# -*- encoding=utf8 -*-
from air_case.mdm_login.登录外网系统.登录外网系统 import login_system
from common.common_func import commonFuc
from common.timeUtils import timeUtils
from common.fileUtls import FileUtils
import sys
__author__ = "xiaohesheng"
"""
case_tag:api,mdm-web,查询器械注册人,id2254,id2254-2,sit,on
主数据平台:器械注册人申报
"""
module = "mdm3_ir"
"""
场景:器械注册人申报
用例名称:器械注册人申报
输入:name
输出:"rtn_msg": "ok"
"""
# 登录
username = commonFuc().get_business_data(module, "username")
password = commonFuc().get_business_data(module, "password")
print(username, password)
# 获取token和projectCode
token, projectCode, uxid, corpId,info = login_system(username, password).get_token()
# 查询器械注册人
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "registrantFromCompany_url")
print(url)
# 获取请求头信息
headers = commonFuc().get_business_data(module, "json_headers2",
commonFuc().get_business_data(module, "json_contentType"), token,
projectCode)
name=commonFuc().get_business_data(module,"name1")#获取前缀name
cname=name+commonFuc().randomString(5)#随机数生成拼接企业名称
request_body = commonFuc().get_business_data(module, "payload1", corpId,cname,cname,cname)
# 发送请求
result = commonFuc().http_post(url, request_body, headers)
# print('实际值',result)
code=commonFuc().analysis_json('code', result)
check_dict = commonFuc().get_business_data(module, "checkDict")
# print('预期值',check_dict)
#断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result)
#断言实际结果中是否包含预期的文本
commonFuc().check_text_exist(code,result)
global_var_cname = cname
\ No newline at end of file
# -*- encoding=utf8 -*-
from air_case.mdm_login.登录外网系统.登录外网系统 import login_system
from common.common_func import commonFuc
from common.timeUtils import timeUtils
from common.fileUtls import FileUtils
import sys
__author__ = "xiaohesheng"
"""
case_tag:api,mdm-web,查询获取器械注册人id,id2254,id2254-3,sit,on
主数据平台:查询获取器械注册人id
"""
module = "mdm3_ir"
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_ir\\a2器械注册人申报.air')
using(pro_path+r'\\air_case\\mdm3_ir\\a2器械注册人申报.air')
from a2器械注册人申报 import *
cname=global_var_cname
# print(cname,'aaaaaaaaaaaaaaaaaaa')
"""
场景:查询获取器械注册人id
用例名称:查询获取器械注册人id
输入:cname
输出:"rtn_msg": "ok"
"""
# 登录
username = commonFuc().get_business_data(module, "username")
password = commonFuc().get_business_data(module, "password")
print(username, password)
# 获取token和projectCode
token, projectCode, uxid, corpId,info = login_system(username, password).get_token()
# 查询获取器械注册人id
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "queryListPage_url")
print(url)
# 获取请求头信息
headers = commonFuc().get_business_data(module, "json_headers2",
commonFuc().get_business_data(module, "json_contentType"), token,
projectCode)
request_body = commonFuc().get_business_data(module, "payload2", cname)
# 发送请求
result = commonFuc().http_post(url, request_body, headers)
print('实际值',result)
total=commonFuc().analysis_json('total',commonFuc().analysis_json('data',result))
code=commonFuc().analysis_json('code',commonFuc().analysis_json('data',result))
data=commonFuc().analysis_json('data',commonFuc().analysis_json('data',result))
id1=commonFuc().analysis_json('id',data)
# 断言实际结果中是否包含预期结果的内容
if total>=0:
commonFuc().check_text_exist(code, result) # 检查验证码
else:
commonFuc().check_text_exist(-1, result)
global_var_id = id1
# -*- encoding=utf8 -*-
from air_case.mdm_login.登录外网系统.登录外网系统 import login_system
from common.common_func import commonFuc
from common.timeUtils import timeUtils
from common.fileUtls import FileUtils
import sys
__author__ = "xiaohesheng"
"""
case_tag:api,mdm-web,器械注册人认领,id2254,id2254-4,sit,on
主数据平台:器械注册人认领
"""
module = "mdm3_ir"
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_ir\\a2查询获取器械注册人id.air')
using(pro_path+r'\\air_case\\mdm3_ir\\a2查询获取器械注册人id.air')
from a2查询获取器械注册人id import *
CRID=global_var_id
# print(cname,'aaaaaaaaaaaaaaaaaaa')
"""
场景:器械注册人认领
用例名称:器械注册人认领
输入:id
输出:"rtn_msg": "ok"
"""
# 登录
username = commonFuc().get_business_data(module, "username")
password = commonFuc().get_business_data(module, "password")
print(username, password)
# 获取token和projectCode
token, projectCode, uxid, corpId,info = login_system(username, password).get_token()
# 器械注册人认领
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "updateById_url")
# print(url)
# 获取请求头信息
headers = commonFuc().get_business_data(module, "json_headers2",
commonFuc().get_business_data(module, "json_contentType"), token,
projectCode)
request_body = commonFuc().get_business_data(module, "payload3", CRID)
# 发送请求
result = commonFuc().http_post(url, request_body, headers)
print('实际值',result)
code=commonFuc().analysis_json('code',commonFuc().analysis_json('data',result))
check_dict = commonFuc().get_business_data(module, "checkDict")
#断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result)
#断言实际结果中是否包含预期的文本
commonFuc().check_text_exist(code,result)
# -*- encoding=utf8 -*-
from air_case.mdm_login.登录外网系统.登录外网系统 import login_system
from common.common_func import commonFuc
from common.timeUtils import timeUtils
from common.fileUtls import FileUtils
import sys
__author__ = "xiaohesheng"
"""
case_tag:api,mdm-web,器械注册人锁定,id2254,id2254-5,sit,on
主数据平台:器械注册人认领
"""
module = "mdm3_ir"
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_ir\\a2查询获取器械注册人id.air')
using(pro_path+r'\\air_case\\mdm3_ir\\a2查询获取器械注册人id.air')
from a2查询获取器械注册人id import *
CRID=global_var_id
# print(cname,'aaaaaaaaaaaaaaaaaaa')
"""
场景:器械注册人锁定
用例名称:器械注册人锁定
输入:id
输出:"rtn_msg": "ok"
"""
# 登录
username = commonFuc().get_business_data(module, "username")
password = commonFuc().get_business_data(module, "password")
print(username, password)
# 获取token和projectCode
token, projectCode, uxid, corpId,info = login_system(username, password).get_token()
# 器械注册人认领
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "updateById_url")
# print(url)
# 获取请求头信息
headers = commonFuc().get_business_data(module, "json_headers2",
commonFuc().get_business_data(module, "json_contentType"), token,
projectCode)
request_body = commonFuc().get_business_data(module, "payload3", CRID)
# 发送请求
result = commonFuc().http_post(url, request_body, headers)
print('实际值',result)
code=commonFuc().analysis_json('code',commonFuc().analysis_json('data',result))
check_dict = commonFuc().get_business_data(module, "checkDict")
#断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result)
#断言实际结果中是否包含预期的文本
commonFuc().check_text_exist(code,result)
global_var_CRID = CRID
\ No newline at end of file
# -*- encoding=utf8 -*-
from air_case.mdm_login.登录外网系统.登录外网系统 import login_system
from common.common_func import commonFuc
from common.timeUtils import timeUtils
from common.fileUtls import FileUtils
import sys
__author__ = "xiaohesheng"
"""
case_tag:api,mdm-web,器械注册人审核通过,id2254,id2254-6,sit,on
主数据平台:器械注册人认领
"""
module = "mdm3_ir"
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_ir\\a器械注册人锁定.air')
using(pro_path+r'\\air_case\\mdm3_ir\\a器械注册人锁定.air')
from a器械注册人锁定 import *
CRID=global_var_CRID
# print(cname,'aaaaaaaaaaaaaaaaaaa')
"""
场景:器械注册人认领
用例名称:器械注册人认领
输入:id
输出:"rtn_msg": "ok"
"""
# 登录
username = commonFuc().get_business_data(module, "username")
password = commonFuc().get_business_data(module, "password")
print(username, password)
# 获取token和projectCode
token, projectCode, uxid, corpId,info = login_system(username, password).get_token()
# 器械注册人认领
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "auditCompanyRegistBill_url")
# print(url)
# 获取请求头信息
headers = commonFuc().get_business_data(module, "json_headers2",
commonFuc().get_business_data(module, "json_contentType"), token,
projectCode)
request_body = commonFuc().get_business_data(module, "payload4", CRID)
# 发送请求
result = commonFuc().http_post(url, request_body, headers)
print('实际值',result)
code=commonFuc().analysis_json('code',commonFuc().analysis_json('data',result))
check_dict1 = commonFuc().get_business_data(module, "checkDict1")
#断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict1, result)
#断言实际结果中是否包含预期的文本
commonFuc().check_text_exist(code,result)
......@@ -142,6 +142,7 @@ class commonFuc(object):
pass
return res
def typeof(self, variate):
"""
变量类型
......
"username": "1679886114521"
"password": "a123456!"
"listVoPage_url": "/test2api/mdmService/provMfrsInfo/listVoPage/"
"registrantFromCompany_url": "/test2api/mdmService/companyRegistBill/registrantFromCompany/"
"queryListPage_url": "/test2api/mdmService/companyRegistBill/queryListPage/"
"updateById_url": "/test2api/mdmService/companyRegistBill/updateById/"
"auditCompanyRegistBill_url": "/test2api/mdmService/companyRegistBill/auditCompanyRegistBill/"
"name1": "国药集团湖北医疗器械有限公司"
json_contentType: "application/json"
json_headers: {
"Content-Type": "%s"
}
json_headers2: {
"Content-Type": "%s",
"token": "%s",
"X-APP-CODE":"%s"
}
"payload": {
"pageNum": 1,
"pageSize": 10,
"queryObject": {
"corpId": "%s",
"cname": "",
"activeFlag": ""
}
}
"payload1": {
"createUserCorpId": "%s",
"cname": "%s",
"address": "%s",
"isAbroad": "1",
"regCode": "",
"enterprise": "",
"compKind": "0",
"email": "",
"registSourceProject": "",
"compFunction": "2",
"compFunctionArr": [
"2"
],
"registContactWay": "%s",
"upCompanyId": "",
"certVOList": []
}
"payload2": {
"pageNum": 1,
"pageSize": 10,
"queryObject": {
"cname": "%s",
"auditStatus": "10"
}
}
"payload3": {
"id": "%s",
"isLocked": 1
}
"payload4": {
"id": "%s"
}
checkDict: {"code": 0,'msg': None,'data':1}
checkDict1: {"code": 0,"msg": null,"data":"审核通过"}
\ No newline at end of file
......@@ -54,8 +54,8 @@
</tr>
<tr width="600">
<td class='details-col-elapsed'>4</td>
<td class='details-col-elapsed'>4</td>
<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">100.0%</td>
</tr>
......@@ -72,30 +72,9 @@
</tr>
<tr width="600">
<td class="details-col-elapsed"><a href='../log/a产品规格申报/log.html' target='_blank'>a产品规格申报</a></td>
<td class="details-col-elapsed"><a href='../log/b器械注册人_审核通过/log.html' target='_blank'>b器械注册人_审核通过</a></td>
<td class="success">成功</td>
<td class="details-col-elapsed">0.829</td>
<td class="details-col-elapsed">xiaohesheng</td>
</tr>
<tr width="600">
<td class="details-col-elapsed"><a href='../log/a查询产品规格数据/log.html' target='_blank'>a查询产品规格数据</a></td>
<td class="success">成功</td>
<td class="details-col-elapsed">0.415</td>
<td class="details-col-elapsed">xiaohesheng</td>
</tr>
<tr width="600">
<td class="details-col-elapsed"><a href='../log/a认领锁定产品规格/log.html' target='_blank'>a认领锁定产品规格</a></td>
<td class="success">成功</td>
<td class="details-col-elapsed">0.835</td>
<td class="details-col-elapsed">xiaohesheng</td>
</tr>
<tr width="600">
<td class="details-col-elapsed"><a href='../log/b产品规格审核通过/log.html' target='_blank'>b产品规格审核通过</a></td>
<td class="success">成功</td>
<td class="details-col-elapsed">0.398</td>
<td class="details-col-elapsed">2.065</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