Commit 5997e0cc authored by xiao-hesheng's avatar xiao-hesheng
Browse files

修改登录接口脚本

parent 12a14ec5
......@@ -41,4 +41,4 @@ def h_Register():
#断言
checkDict=commonFuc().get_business_data(module,'checkDict')
commonFuc().check_result(checkDict,result)
h_Register()
\ No newline at end of file
h_Register()
......@@ -4,14 +4,14 @@ from common.common_func import commonFuc
__author__ = "meimengting"
"""
case_tag:api,medical-web,sit,on
case_tag:api,medical-web11111,sit,on
"""
from airtest.core.api import *
import sys
sys.path.append('..')
# import sys
# sys.path.append('..')
from common.db.db import dbOP
import time
# import time
# using("common_steps.air")
# import common_steps
# result_db = dbOP().selectSql('exp_expert', [0, 20])
......@@ -20,9 +20,9 @@ import time
enc_user_id可替换成接口实际所需要id,默认是u779700044448
获取token和时间戳
"""
enc_user_id = 'u97969333801'
# enc_user_id = 'u97969333801'
# token = common_steps.check_token(enc_user_id)
timestamp = str(int(time.time()))
# timestamp = str(int(time.time()))
# "按照环境将url管理起来,更改api url后的接口名即可"
# url = common_steps.get_api_url()
......
......@@ -43,7 +43,7 @@ def Enterprise_audit():
# 发送请求
result = commonFuc().http_post(url, request_body, headers)
# # print(result)
print(result)
# 获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict")
print(check_dict)
......@@ -88,15 +88,16 @@ def Enterprise_audit():
# 企业注册提交接口_审核通过_开始
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "auditCompanyRegistBill_url")
request_body = commonFuc().get_business_data(module, "payload5", id1)
print('aaaaaaaaaaaaaaaaaaaaaaaaa',id1,url,headers)
# 发送请求
result = commonFuc().http_post(url, request_body, headers)
# print('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',result)
print('企业审核通过aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',result)
# 获取接口返回数据
code = commonFuc().analysis_json('code', result)
check_dict1 = commonFuc().get_business_data(module, "checkDict1")
# 断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict1, result)
# commonFuc().check_result(check_dict1, result)
return cname
# ===============企业注册提交接口_审核通过_结束
......@@ -107,7 +108,9 @@ def p_m_a():
password = commonFuc().get_business_data(module, "password")
print(username, password)
# 获取token和projectCode
print('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
token, projectCode, uxid, corpId,info = login_system(username, password).get_token()
print('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',token, projectCode, uxid, corpId,info)
# 分页查询供应商产品数据接口
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "listVoPage_url")
......
......@@ -2,7 +2,7 @@
__author__ = "xiaohesheng"
"""
case_tag:mdm-web,10086登录,用例集id2226
case_tag:mdm-web,mdmlogin,用例集id2226
主数据平台:统一登录接口,第一步获取验证码,第二步登录系统,第三步平台登录验证token
"""
......
......@@ -2,7 +2,7 @@
__author__ = "xiaohesheng"
"""
case_tag:mdm-web1,10086登录,用例集id2226
case_tag:mdm-web,10086登录,用例集id2226
主数据平台:统一登录接口,第一步获取验证码,第二步登录系统,第三步平台登录验证token
"""
......@@ -71,7 +71,7 @@ class login_system():
return token,projectCode,uxid,corpId,info
print(login_system('test001', '1qaz!QAZ').get_token())
login_system('test001', '1qaz!QAZ').get_token()
# if __name__ == '__main__':
# print(login_system('test001','1qaz!QAZ').get_token())
#1679886114521 a123456!
......@@ -15,6 +15,7 @@ class delByBranchId(object):
cursor.execute(sql)
cursor.execute("commit;")
print('%s院区数据已删除成功' % id)
cursor.close()
# delByBranchId().Delete_branch_by_name('11122222')
\ No newline at end of file
......@@ -15,6 +15,7 @@ class delKindGoodsinfo(object):
cursor.execute(sql)
cursor.execute("commit;")
print('耗材分类下的产品删除完毕' )
cursor.close()
def delkind(self):
connection = pymysql.connect(host="10.17.65.108", user="root", password="Cmic.2023", database="spd3_herp_test2",
charset="utf8")
......
......@@ -15,6 +15,6 @@ class delByNoticeName(object):
cursor.execute(sql)
cursor.execute("commit;")
print('%s公告数据已逻辑删除成功')
cursor.close()
# delByNoticeName().delete_ByNoticeName()
院区新增:
branch_id: h0347-2658
branch_name: 东土城路院区pOryX
科室信息:
dept2_id: 8f3aed0a165c486a92721cccb4298abc
dept2_name: 二级科室002
单元包信息:
branchGoodsId: h0347-265800001952
hosGoodsId: h034700001952
branch_id: h0347-2915
branch_name: 东土城路院区Na1KT
公告新增:
notices_id: N000872
notices_name: test
notices_id: N001121-h0347
notices_name:
......@@ -19,7 +19,9 @@
122.9.41.244 gerrit.babytree-inc.com
10.54.17.153 localproxy.baobaoshu.com
192.168.24.43 gerrit.mtmm.com
10.17.65.22 case.cmic.com.cn
#10.17.65.22 case.cmic.com.cn
10.54.50.90 sso.baobaoshu.com
8.131.247.52 docp.plt.babytree-inc.com
10.17.65.49 spd2hospitaltest2.cmic.com.cn
#10.17.65.49 spd2hospitaluat.cmic.com.cn
10.17.65.49 case.cmic.com.cn
......@@ -4,7 +4,7 @@
"queryListPage_url": "/test2api/mdmService/companyRegistBill/queryListPage"
"queryAlCompanyRegistInfo_url": "/test2api/mdmService/companyRegistBill/queryAlCompanyRegistInfo"
"upCompanyList_url": "/test2api/mdmService/mdmCompany/upCompanyList"
"auditCompanyRegistBill_url": "/test2api/mdmService/companyRegistBill/auditCompanyRegistBill/"
"auditCompanyRegistBill_url": "/test2api/mdmService/companyRegistBill/auditCompanyRegistBill"
"updateByIdCompanyRegistBill_url": "/test2api/mdmService/companyRegistBill/updateById/"
"username": "test001"
"password": "1qaz!QAZ"
......@@ -48,7 +48,7 @@ json_headers2: {
}
"payload5": {
"id": "%s"
"id":"%s"
}
"payload6": {
......
# 登录外网(主数据平台)系统
"VerifyCode_url": "/test2api/oauthService/auth/getVerifyCode"
"login_url": "/test2api/oauthService/auth/login"
"login_url": "/test2api/hdiFusion/user/login"
"platform_login_url": "/test2api/platformService/userOnline/getUserOnlineLogin"
"username": "test001"
"password": "1qaz!QAZ"
......
......@@ -55,9 +55,9 @@
<tr width="600">
<td class='details-col-elapsed'>1</td>
<td class='details-col-elapsed'>1</td>
<td class='details-col-elapsed'>0分1</td>
<td class="details-col-elapsed">100.0%</td>
<td class='details-col-elapsed'>0</td>
<td class='details-col-elapsed'>0分4</td>
<td class="details-col-elapsed">0.0%</td>
</tr>
</table>
......@@ -72,9 +72,9 @@
</tr>
<tr width="600">
<td class="details-col-elapsed"><a href='../log/g1_请领出库渠道设置_转移产品到供应商直配/log.html' target='_blank'>g1_请领出库渠道设置_转移产品到供应商直配</a></td>
<td class="success">成功</td>
<td class="details-col-elapsed">0.925</td>
<td class="details-col-elapsed"><a href='../log/a8产品新增和审核通过/log.html' target='_blank'>a8产品新增和审核通过</a></td>
<td class="fail">失败</td>
<td class="details-col-elapsed">4.733</td>
<td class="details-col-elapsed">xiaohesheng</td>
</tr>
......
......@@ -13,9 +13,9 @@ sys.path.append(rootPath)
if __name__ == '__main__':
# 第一个参数 case 执行类型,'all', 'sc', 'tag'
caseType = sys.argv[1]
# 第2个参数要执行的caseName, 多个文件逗号分割
# 第2个参数要执行
# 第3个参数,设置日志等级的caseName, 多个文件逗号分割
caseName = sys.argv[2]
# 第3个参数,设置日志等级
log_level = sys.argv[3]
log_level = log_level.lower()
#获取运行环境,写入环境变量
......
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