Commit 11b9a3c3 authored by 周念东's avatar 周念东
Browse files

用例优化

parent f4cc6dff
......@@ -2,7 +2,7 @@
__author__ = "zhouniandong"
"""
case_tag:cmdc_api,cmdc商品信息管理,2293,2293-3,sit,bs
case_tag:cmdc_api,cmdc商品信息管理,2003-3,2003-3-1,sit,bs
主数据平台:运营后台管理系统商品信息管理接口
"""
......
......@@ -2,7 +2,7 @@
__author__ = "zhouniandong"
"""
case_tag:cmdc_api,cmdc商品信息管理按公司ID无代码查询网站,2293,2293-3,sit,bs
case_tag:cmdc_api,cmdc商品信息管理按公司ID无代码查询网站,2003-3,2003-3-4,sit,bs
主数据平台:运营后台管理系统商品信息管理接口
"""
......
# -*- encoding=utf8 -*-
__author__ = "zhouniandong"
"""
case_tag:cmdc_api,cmdc商品信息管理查看导入日志,2003-3,2003-3-6,sit,bs
主数据平台:运营后台管理系统商品信息管理接口
"""
from common.common_func import commonFuc
from air_case.cmdc_login.后台管理系统登录.后台管理系统登录 import CmdcDoLogin
import requests
import json
module = "cmdc_product_info"
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "url6")
print(url)
# 获取登录所需账号密码
username = commonFuc().get_business_data(module, "username")
password = commonFuc().get_business_data(module, "password")
# 获取登录后Cmdc_access_token
cmdc_access_token = CmdcDoLogin(username, password).get_token()
headers = commonFuc().get_business_data(module, "json_headers", cmdc_access_token)
request_body = commonFuc().get_business_data(module, "payload6")
"""
场景:商品信息管理()
用例名称:商品信息管理查看导入日志(商品信息管理)
输出:{"success":true,"code":"200","message":"OK"}
"""
# 发送请求
result = requests.get(url, params=request_body, headers=headers)
result = json.loads(result.content)
#print("\033[031mresult============\033[0m",result)
# 获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict6")
print(check_dict)
# 断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result)
......@@ -2,7 +2,7 @@
__author__ = "zhouniandong"
"""
case_tag:cmdc_api,cmdc商品信息管理查询产品线名称,2293,2293-3,sit,bs
case_tag:cmdc_api,cmdc商品信息管理查询产品线名称,2003-3,2003-3-5,sit,bs
主数据平台:运营后台管理系统商品信息管理接口
"""
......
......@@ -2,7 +2,7 @@
__author__ = "zhouniandong"
"""
case_tag:cmdc_api,cmdc商品信息管理获取生产厂商,2293,2293-3,sit,bs
case_tag:cmdc_api,cmdc商品信息管理获取生产厂商,2003-3,2003-3-2,sit,bs
主数据平台:运营后台管理系统商品信息管理接口
"""
......
......@@ -2,7 +2,7 @@
__author__ = "zhouniandong"
"""
case_tag:cmdc_api,cmdc商品信息管理选择已发布产品类别选项,2293,2293-3,sit,bs
case_tag:cmdc_api,cmdc商品信息管理选择已发布产品类别选项,2003-3,2003-3-3,sit,bs
主数据平台:运营后台管理系统商品信息管理接口
"""
......
......@@ -37,7 +37,11 @@ checkDict4: {"success":true,"code":"200","message":"操作成功"}
#预期结果
checkDict5: {"success":true,"code":"200","message":"OK"}
#商品信息管理查看导入日志
"url6": "/product/public/excelLog/list"
"payload6": sheetName=%E6%89%B9%E9%87%8F%E7%BB%B4%E6%8A%A4%E5%95%86%E5%93%81%E4%BF%A1%E6%81%AF&pageStart=1&pageSize=10&total=0
#预期结果
checkDict6: {"success":true,"code":"200","message":"OK"}
商品信息发布查看日志 1718862845315 1718862848400 zhouniandong
商品信息管理查看导入日志 1718864823687 1718864824914 zhouniandong
......@@ -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分3</td>
<td class='details-col-elapsed'>0分1</td>
<td class="details-col-elapsed">100.0%</td>
</tr>
</table>
......@@ -73,9 +73,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">3.085</td>
<td class="details-col-elapsed">1.227</td>
<td class="details-col-elapsed">zhouniandong</td>
<td class="details-col-elapsed">0</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