Commit af536952 authored by xiao-hesheng's avatar xiao-hesheng
Browse files

优化脚本

parent b2b9fe2c
......@@ -3,7 +3,7 @@
__author__ = "xiaohesheng"
"""
case_tag:api,mdm-web企业审核,id2248,sit,on
case_tag:api,mdm-web企业审核,id2248,id2248-1,sit,on
主数据平台:注册企业审核认领流程
"""
......@@ -32,7 +32,7 @@ username = commonFuc().get_business_data(module, "username")
password = commonFuc().get_business_data(module, "password")
print(username, password)
# 获取token和projectCode
token,projectCode,uxid,corpId= login_system(username, password).get_token()
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,
......
......@@ -3,7 +3,7 @@
__author__ = "xiaohesheng"
"""
case_tag:api,mdm-web企业审核,id2248,sit,on
case_tag:api,mdm-web企业审核,id2248,id2248-2,sit,on
主数据平台:注册企业审核驳回认领流程
"""
......@@ -32,7 +32,7 @@ username = commonFuc().get_business_data(module, "username")
password = commonFuc().get_business_data(module, "password")
print(username, password)
# 获取token和projectCode
token,projectCode,uxid,corpId = login_system(username, password).get_token()
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,
......
......@@ -33,7 +33,7 @@ username = commonFuc().get_business_data(module, "username")
password = commonFuc().get_business_data(module, "password")
print(username, password)
# 获取token和projectCode
token, projectCode, uxid,corpId = login_system(username, password).get_token()
token, projectCode, uxid,corpId,info = login_system(username, password).get_token()
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "queryListPage_url")
# 获取请求头信息
headers = commonFuc().get_business_data(module, "json_headers2",
......
......@@ -33,7 +33,7 @@ username = commonFuc().get_business_data(module, "username")
password = commonFuc().get_business_data(module, "password")
print(username, password)
# 获取token和projectCode
token, projectCode, uxid,corpId = login_system(username, password).get_token()
token, projectCode, uxid,corpId,info = login_system(username, password).get_token()
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "queryListPage_url")
# 获取请求头信息
headers = commonFuc().get_business_data(module, "json_headers2",
......
......@@ -4,7 +4,7 @@ from common.timeUtils import timeUtils
__author__ = "xiaohesheng"
"""
case_tag:api,mdm-web企业审核,id2248,id2248-1,sit,on,2023091201
case_tag:api,mdm-web产品新增和审核,id2251,id2251-1,sit,on,2023091201
主数据平台:产品新增和审核通过
"""
......
# -*- encoding=utf8 -*-
import sys
from air_case.mdm_login.登录外网系统.登录外网系统 import login_system
from common.timeUtils import timeUtils
from common.common_func import commonFuc
from common.fileUtls import *
__author__ = "xiaohesheng"
"""
case_tag:api,mdm-web企业审核,id2248,id2248-2,sit,on,2023091202
主数据平台:产品新增和审核通过
case_tag:api,mdm-web产品规格新增,id2251,id2251-2,sit,on,2023091202
主数据平台:web产品规格新增
"""
from common.common_func import commonFuc
pro_path=commonFuc().get_pro_path()
from airtest.core.api import using
module = "mdm3-pim"
# 登录
info = FileUtils().r_info(module,'产品新增')
username=info['username']
password = commonFuc().get_business_data(module, "password")
print(username, password)
# 获取token和projectCode
token, projectCode, uxid, corpId = login_system(username, password).get_token()
# # 分页查询供应商产品数据接口
# url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "listVoPage_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)
# sys.path.append(pro_path+'\\air_case\\mdm3-pim\\产品新增和审核通过.air')
sys.path.append(r'D:\PycharmProjects\autotest-airtest-web\\air_case\\mdm3-pim2\\产品新增和审核通过.air')
using("产品新增和审核通过.air")
......@@ -67,7 +67,8 @@ class login_system():
# 断言实际结果中是否不包含预期的文本
commonFuc().check_text_exist(uxid, result)
corpId=commonFuc().analysis_json('corpId', result)
return token,projectCode,uxid,corpId
info=(token,projectCode,uxid,corpId)
return token,projectCode,uxid,corpId,info
# login_system('test001', 'a123456!').get_token()
......
......@@ -40,7 +40,7 @@ if __name__ == '__main__':
# info=("aaaa","bbbbbb","mdm3-pim")
# FileUtils().w_info(info,"产品新增")
aa=FileUtils().r_info("mdm3-pim","产品新增")
print(aa)
print(aa['username'])
......
......@@ -56,7 +56,7 @@
<tr width="600">
<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'>0分1</td>
<td class="details-col-elapsed">100.0%</td>
</tr>
</table>
......@@ -72,9 +72,9 @@
</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/注册企业锁定认领审核流程/log.html' target='_blank'>注册企业锁定认领审核流程</a></td>
<td class="success">成功</td>
<td class="details-col-elapsed">2.531</td>
<td class="details-col-elapsed">1.268</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