Commit 94032d3f authored by liguangyu06's avatar liguangyu06
Browse files

Merge remote-tracking branch 'origin/master'

parents fc97498a 48234583
# -*- encoding=utf8 -*-
__author__ = "xiaohesheng"
"""
case_tag:api,mdm-web企业认领,id2248,id2248-1,sit,on
主数据平台:注册企业审核认领流程
"""
from common.common_func import commonFuc
from air_case.mdm_login.登录外网系统.登录外网系统 import login_system
from airtest.core.api import using
import sys
module = "mdm3_ea"
pro_path=commonFuc().get_pro_path()
sys.path.append(pro_path+r'\\air_case\\mdm3_es\\外网企业注册提交接口_正常注册.air')
using(pro_path+r'\\air_case\\mdm3_es\\外网企业注册提交接口_正常注册.air')
from 外网企业注册提交接口_正常注册 import es
id1,cname=es()
"""
场景:注册企业认领
用例名称:企业认领
输入:CRid
输出:"rtn_msg": "企业被认领"
"""
#企业注册提交接口_认领
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "updateById_url")
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()
#获取请求头信息
headers = commonFuc().get_business_data(module, "json_headers2",
commonFuc().get_business_data(module, "json_contentType"), token,
projectCode, token)
request_body = commonFuc().get_business_data(module, "payload1",id1)
# 发送请求
result = commonFuc().http_post(url, request_body, headers)
# # print(result)
#获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict")
print(check_dict)
#断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result)
#=============== 企业注册提交接口_认领结束
global_var_id = id1
global_var_cname=cname
\ No newline at end of file
# -*- encoding=utf8 -*-
__author__ = "xiaohesheng"
"""
case_tag:api,mdm-web企业锁定,id2248,id2248-2,sit,on
主数据平台:注册企业审核锁定流程
"""
from common.common_func import commonFuc
from air_case.mdm_login.登录外网系统.登录外网系统 import login_system
from airtest.core.api import using
import sys
module = "mdm3_ea"
pro_path=commonFuc().get_pro_path()
sys.path.append(pro_path+r'\\air_case\\mdm3_ea\\a企业认领.air')
using(pro_path+r'\\air_case\\mdm3_ea\\a企业认领.air')
from a企业认领 import *
# print('global_var_id',global_var_id)
id1=global_var_id
"""
场景:注册企业锁定
用例名称:企业锁定
输入:CRid
输出:"rtn_msg": "企业被锁定"
"""
#企业注册提交接口_锁定_开始
username = commonFuc().get_business_data(module, "username")
password = commonFuc().get_business_data(module, "password")
# 获取token和projectCode
token,projectCode,uxid,corpId,info= login_system(username, password).get_token()
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "queryAlCompanyRegistInfo_url")
#获取请求头信息
headers = commonFuc().get_business_data(module, "json_headers2",
commonFuc().get_business_data(module, "json_contentType"), token,
projectCode, token)
request_body = commonFuc().get_business_data(module, "payload3",id1)
# 发送请求
result = commonFuc().http_post(url, request_body, headers)
#获取接口返回数据
code = commonFuc().analysis_json('code', result)
#断言实际结果中是否包含预期结果的内容
commonFuc().check_text_exist(code, result)
#===============企业注册提交接口_锁定_结束
\ No newline at end of file
# -*- encoding=utf8 -*-
__author__ = "xiaohesheng"
"""
case_tag:api,mdm-web企业审核,id2248,id2248-3,sit,on
主数据平台:注册企业审核认领流程
"""
from common.common_func import commonFuc
from air_case.mdm_login.登录外网系统.登录外网系统 import login_system
from airtest.core.api import using
import sys
module = "mdm3_ea"
pro_path=commonFuc().get_pro_path()
sys.path.append(pro_path+r'\\air_case\\mdm3_ea\\a企业认领.air')
using(pro_path+r'\\air_case\\mdm3_ea\\a企业认领.air')
from a企业认领 import *
# print('global_var_id',global_var_id)
id1=global_var_id
"""
场景:注册企业认领
用例名称:企业认领
输入:CRid
输出:"rtn_msg": "企业被认领"
"""
# 企业注册提交接口_审核通过_开始
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()
#获取请求头信息
headers = commonFuc().get_business_data(module, "json_headers2",
commonFuc().get_business_data(module, "json_contentType"), token,
projectCode, token)
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "auditCompanyRegistBill_url")
request_body = commonFuc().get_business_data(module, "payload5",id1)
# 发送请求
result = commonFuc().http_post(url, request_body, headers)
# print('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',result)
#获取接口返回数据
code = commonFuc().analysis_json('code', result)
check_dict1 = commonFuc().get_business_data(module, "checkDict1")
#断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict1, result)
#===============企业注册提交接口_审核通过_结束
\ No newline at end of file
# -*- encoding=utf8 -*-
__author__ = "xiaohesheng"
"""
case_tag:api,mdm-web企业审核,id2248,id2248-4,sit,on
主数据平台:注册企业审核认领流程
"""
from common.common_func import commonFuc
from air_case.mdm_login.登录外网系统.登录外网系统 import login_system
from airtest.core.api import using
import sys
module = "mdm3_ea"
pro_path=commonFuc().get_pro_path()
sys.path.append(pro_path+r'\\air_case\\mdm3_ea\\a企业认领.air')
using(pro_path+r'\\air_case\\mdm3_ea\\a企业认领.air')
from a企业认领 import *
# print('global_var_id',global_var_id)
cname=global_var_cname
"""
场景:企业查询
用例名称:企业查询
输入:Cname
输出:"rtn_msg": "企业信息"
"""
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()
#获取请求头信息
headers = commonFuc().get_business_data(module, "json_headers2",
commonFuc().get_business_data(module, "json_contentType"), token,
projectCode, token)
#企业审核接口_查询数据_开始
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "queryListPage_url")
request_body = commonFuc().get_business_data(module, "payload2",cname)
# 发送请求
result = commonFuc().http_post(url, request_body, headers)
#获取接口返回数据
code = commonFuc().analysis_json('code', result)
#断言实际结果中是否包含预期结果的内容
# commonFuc().check_result(code, result)
#断言实际结果中是否包含预期的文本
commonFuc().check_text_exist(code,result)
#===============企业注册提交接口_查询数据_结束
\ No newline at end of file
# -*- encoding=utf8 -*-
__author__ = "xiaohesheng"
"""
case_tag:api,mdm-web企业审核,id2248,id2248-5,sit,on
主数据平台:注册企业审核认领流程
"""
from common.common_func import commonFuc
from air_case.mdm_login.登录外网系统.登录外网系统 import login_system
from airtest.core.api import using
import sys
module = "mdm3_ea"
pro_path=commonFuc().get_pro_path()
sys.path.append(pro_path+r'\\air_case\\mdm3_ea\\a企业认领.air')
using(pro_path+r'\\air_case\\mdm3_ea\\a企业认领.air')
from a企业认领 import *
# print('global_var_id',global_var_id)
cname=global_var_cname
"""
场景:企业查询
用例名称:企业查询
输入:Cname
输出:"rtn_msg": "企业信息"
"""
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()
#获取请求头信息
headers = commonFuc().get_business_data(module, "json_headers2",
commonFuc().get_business_data(module, "json_contentType"), token,
projectCode, token)
#企业审核接口_再次查询数据_开始
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "upCompanyList_url")
request_body = commonFuc().get_business_data(module, "payload4",cname)
# 发送请求
result = commonFuc().http_post(url, request_body, headers)
#获取接口返回数据
code = commonFuc().analysis_json('code', result)
#断言实际结果中是否包含预期结果的内容
commonFuc().check_text_exist(code, result)
# #===============企业注册提交接口_查询数据_结束
\ No newline at end of file
# -*- encoding=utf8 -*-
__author__ = "xiaohesheng"
"""
case_tag:api,mdm-web企业审核,id2248,id2248-1,sit,on
主数据平台:注册企业审核认领流程
"""
from common.common_func import commonFuc
from air_case.mdm_login.登录外网系统.登录外网系统 import login_system
module = "mdm3-ea"
# 注册企业
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "CompanyRegist_url")
# #获取请求头信息
headers = commonFuc().get_business_data(module, "json_headers",
commonFuc().get_business_data(module, "json_contentType"))
print(headers)
name = commonFuc().get_business_data(module, "name1") # 获取前缀name
cname = name + commonFuc().randomString(5) # 随机数生成拼接企业名称
request_body = commonFuc().get_business_data(module, "payload", cname, cname, cname, cname, cname, cname)
print(request_body)
# 发送请求
result = commonFuc().http_post(url, request_body, headers)
# 获取接口返回id
id1 = commonFuc().analysis_json('id', result)
# 企业注册提交接口_认领
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "updateById_url")
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()
#获取请求头信息
headers = commonFuc().get_business_data(module, "json_headers2",
commonFuc().get_business_data(module, "json_contentType"), token,
projectCode, token)
request_body = commonFuc().get_business_data(module, "payload1",id1)
# 发送请求
result = commonFuc().http_post(url, request_body, headers)
# # print(result)
#获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict")
print(check_dict)
#断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result)
#=============== 企业注册提交接口_认领结束
#企业审核接口_查询数据_开始
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "queryListPage_url")
request_body = commonFuc().get_business_data(module, "payload2",cname)
# 发送请求
result = commonFuc().http_post(url, request_body, headers)
#获取接口返回数据
code = commonFuc().analysis_json('code', result)
#断言实际结果中是否包含预期结果的内容
# commonFuc().check_result(code, result)
#断言实际结果中是否包含预期的文本
commonFuc().check_text_exist(code,result)
#===============企业注册提交接口_查询数据_结束
#企业注册提交接口_锁定_开始
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "queryAlCompanyRegistInfo_url")
request_body = commonFuc().get_business_data(module, "payload3",id1)
# 发送请求
result = commonFuc().http_post(url, request_body, headers)
#获取接口返回数据
code = commonFuc().analysis_json('code', result)
#断言实际结果中是否包含预期结果的内容
commonFuc().check_text_exist(code, result)
#===============企业注册提交接口_锁定_结束
#企业审核接口_再次查询数据_开始
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "upCompanyList_url")
request_body = commonFuc().get_business_data(module, "payload4",cname)
# 发送请求
result = commonFuc().http_post(url, request_body, headers)
#获取接口返回数据
code = commonFuc().analysis_json('code', result)
#断言实际结果中是否包含预期结果的内容
commonFuc().check_text_exist(code, result)
#===============企业注册提交接口_查询数据_结束
#企业注册提交接口_审核通过_开始
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "auditCompanyRegistBill_url")
request_body = commonFuc().get_business_data(module, "payload5",id1)
# 发送请求
result = commonFuc().http_post(url, request_body, headers)
# print('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',result)
#获取接口返回数据
code = commonFuc().analysis_json('code', result)
check_dict1 = commonFuc().get_business_data(module, "checkDict1")
#断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict1, result)
#===============企业注册提交接口_审核通过_结束
......@@ -3,14 +3,14 @@
__author__ = "xiaohesheng"
"""
case_tag:api,mdm-web企业审核,id2248,id2248-2,sit,on
case_tag:api,mdm-web企业审核,id2248,id2248-6,sit,on
主数据平台:注册企业审核驳回认领流程
"""
from common.common_func import commonFuc
from air_case.mdm_login.登录外网系统.登录外网系统 import login_system
module = "mdm3-ea"
module = "mdm3_ea"
# 注册企业
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "CompanyRegist_url")
# #获取请求头信息
......
......@@ -8,7 +8,6 @@ case_tag:api,mdm-web正常注册,id2232,id2232-5,sit,on
from common.common_func import commonFuc
import time
def es():
module = "mdm3_es"
......@@ -31,11 +30,12 @@ def es():
"""
#发送请求
result = commonFuc().http_post(url, request_body, headers)
print(result)
print('返回结果',result)
#获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict")
print(check_dict)
#断言实际结果中是否不包含预期的文本
commonFuc().check_text_exist(name,result)
return cname
id1=commonFuc().analysis_json('id',result)
return id1,cname
es()
......@@ -271,7 +271,7 @@ checkDict: {"code": 0,'msg': None}
}
#器械注册人_企业注册提交_正常注册
"payload4": {
"compFunction": "1",
"compFunction": "2",
"compFunctionArr": [
"2"
],
......
......@@ -54,9 +54,9 @@
</tr>
<tr width="600">
<td class='details-col-elapsed'>1</td>
<td class='details-col-elapsed'>1</td>
<td class='details-col-elapsed'>0分0</td>
<td class='details-col-elapsed'>7</td>
<td class='details-col-elapsed'>7</td>
<td class='details-col-elapsed'>0分4</td>
<td class="details-col-elapsed">100.0%</td>
</tr>
</table>
......@@ -72,9 +72,51 @@
</tr>
<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/a企业认领/log.html' target='_blank'>a企业认领</a></td>
<td class="success">成功</td>
<td class="details-col-elapsed">0.376</td>
<td class="details-col-elapsed">1.082</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">1.088</td>
<td class="details-col-elapsed">xiaohesheng</td>
</tr>
<tr width="600">
<td class="details-col-elapsed"><a href='../log/企业审核/log.html' target='_blank'>企业审核</a></td>
<td class="success">成功</td>
<td class="details-col-elapsed">0.651</td>
<td class="details-col-elapsed">xiaohesheng</td>
</tr>
<tr width="600">
<td class="details-col-elapsed"><a href='../log/企业查询/log.html' target='_blank'>企业查询</a></td>
<td class="success">成功</td>
<td class="details-col-elapsed">0.4</td>
<td class="details-col-elapsed">xiaohesheng</td>
</tr>
<tr width="600">
<td class="details-col-elapsed"><a href='../log/企业查询2/log.html' target='_blank'>企业查询2</a></td>
<td class="success">成功</td>
<td class="details-col-elapsed">0.435</td>
<td class="details-col-elapsed">xiaohesheng</td>
</tr>
<tr width="600">
<td class="details-col-elapsed"><a href='../log/注册企业锁定认领审核流程/log.html' target='_blank'>注册企业锁定认领审核流程</a></td>
<td class="success">成功</td>
<td class="details-col-elapsed">0.001</td>
<td class="details-col-elapsed">xiaohesheng</td>
</tr>
<tr width="600">
<td class="details-col-elapsed"><a href='../log/注册企业锁定认领审核驳回流程/log.html' target='_blank'>注册企业锁定认领审核驳回流程</a></td>
<td class="success">成功</td>
<td class="details-col-elapsed">0.806</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