Commit f4cc6dff authored by 周念东's avatar 周念东
Browse files

用例优化

parent 4d6d362d
......@@ -2,7 +2,7 @@
__author__ = "zhouniandong"
"""
case_tag:cmdc_api,cmdc商品信息发布,2293,2293-2,sit,bs
case_tag:cmdc_api,cmdc商品信息发布,2003,2003-2-3,sit,bs
主数据平台:运营后台管理系统商品信息发布接口
"""
......
......@@ -2,7 +2,7 @@
__author__ = "zhouniandong"
"""
case_tag:cmdc_api,cmdc商品信息发布按公司ID无代码查询网站,2293,2293-2,sit,bs
case_tag:cmdc_api,cmdc商品信息发布按公司ID无代码查询网站,2003,2003-2-2,sit,bs
主数据平台:运营后台管理系统商品信息发布接口
"""
......
# -*- encoding=utf8 -*-
__author__ = "zhouniandong"
"""
case_tag:cmdc_api,cmdc商品信息发布查看日志,2003,2003-2-6,sit,bs
主数据平台:运营后台管理系统商品信息发布接口
"""
from common.common_func import commonFuc
from air_case.cmdc_login.后台管理系统登录.后台管理系统登录 import CmdcDoLogin
import requests
import json
module = "cmdc_product_info_release"
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, json=request_body, headers=headers)
result = json.loads(result.content)
# print(result)
# 获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict6")
print(check_dict)
# 断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result)
\ No newline at end of file
......@@ -2,7 +2,7 @@
__author__ = "zhouniandong"
"""
case_tag:cmdc_api,cmdc商品信息发布查询产品线名称,2293,2293-2,sit,bs
case_tag:cmdc_api,cmdc商品信息发布查询产品线名称,2003,2003-2-2,sit,bs
主数据平台:运营后台管理系统商品信息发布接口
"""
......
......@@ -2,7 +2,7 @@
__author__ = "zhouniandong"
"""
case_tag:cmdc_api,cmdc商品信息发布获取生产厂商,2293,2293-2,sit,bs
case_tag:cmdc_api,cmdc商品信息发布获取生产厂商,2003,2003-2-1,sit,bs
主数据平台:运营后台管理系统商品信息发布接口
"""
......
......@@ -2,7 +2,7 @@
__author__ = "zhouniandong"
"""
case_tag:cmdc_api,cmdc商品信息发布选择已发布产品类别选项,2293,2293-2,sit,bs
case_tag:cmdc_api,cmdc商品信息发布选择已发布产品类别选项,2003,2003-2-4,sit,bs
主数据平台:运营后台管理系统商品信息发布接口
"""
......
......@@ -40,10 +40,15 @@ checkDict3: {"success":true,"code":"200","message":"OK"}
#预期结果
checkDict4: {"success":true,"code":"200","message":"OK"}
#商品信息发布查询产品线名称
#商品信息发布查询产品线名称 get
"url5": "/product/public/queryProductLineName"
"payload5": filialeCode=00111
#预期结果
checkDict5: {"success":true,"code":"200","message":"OK"}
#商品信息发布查看日志 get
"url6": "/product/public/excelLog/list"
"payload6": sheetName=%E5%95%86%E5%93%81%E4%BF%A1%E6%81%AF%E5%8F%91%E5%B8%83%E5%AF%BC%E5%85%A5&pageStart=1&pageSize=10&total=0
#预期结果
checkDict6: {"success":true,"code":"200","message":"OK"}
多采商城库存调拨管理全部调拨分页列表 1718850972235 1718850973044 zhouniandong
商品信息发布查看日志 1718862845315 1718862848400 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分1</td>
<td class='details-col-elapsed'>0分3</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">0.809</td>
<td class="details-col-elapsed">3.085</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