Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
test
autotest-airtest-web-cmdc
Commits
3352dedb
Commit
3352dedb
authored
1 year ago
by
周念东
Browse files
Options
Download
Email Patches
Plain Diff
商品附件管理更新
parent
4d06e777
master
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
air_case/cmdc_product_attachment/商品附件管理查询上传产品文件.air/商品附件管理查询上传产品文件.py
+41
-0
...c_product_attachment/商品附件管理查询上传产品文件.air/商品附件管理查询上传产品文件.py
air_case/cmdc_product_attachment/商品附件管理查询所有产品线名称.air/商品附件管理查询所有产品线名称.py
+41
-0
...product_attachment/商品附件管理查询所有产品线名称.air/商品附件管理查询所有产品线名称.py
data/cmdc_product_attachment/data
+21
-0
data/cmdc_product_attachment/data
with
103 additions
and
0 deletions
+103
-0
air_case/cmdc_product_attachment/商品附件管理查询上传产品文件.air/商品附件管理查询上传产品文件.py
0 → 100644
+
41
-
0
View file @
3352dedb
# -*- encoding=utf8 -*-
__author__
=
"zhouniandong"
"""
case_tag:cmdc_api,cmdc商品附件管理查询上传产品文件,2250,2250-20,sit,bs
主数据平台:运营后台管理系统商品附件管理接口
"""
from
common.common_func
import
commonFuc
from
air_case.cmdc_login.后台管理系统登录.后台管理系统登录
import
CmdcDoLogin
import
requests
import
json
module
=
"cmdc_product_attachment"
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"url2"
)
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
,
"payload2"
)
"""
场景:商品附件管理()
用例名称:商品附件管理查询上传产品文件(商品附件管理)
输出:{"success":true,"code":"200","message":"OK"}
"""
# 发送请求
result
=
requests
.
post
(
url
,
json
=
request_body
,
headers
=
headers
)
result
=
json
.
loads
(
result
.
content
)
# print(result)
# 获取预期结果
check_dict
=
commonFuc
().
get_business_data
(
module
,
"checkDict2"
)
print
(
check_dict
)
# 断言实际结果中是否包含预期结果的内容
commonFuc
().
check_result
(
check_dict
,
result
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
air_case/cmdc_product_attachment/商品附件管理查询所有产品线名称.air/商品附件管理查询所有产品线名称.py
0 → 100644
+
41
-
0
View file @
3352dedb
# -*- encoding=utf8 -*-
__author__
=
"zhouniandong"
"""
case_tag:cmdc_api,cmdc商品附件管理查询所有产品线名称,2250,2250-20,sit,bs
主数据平台:运营后台管理系统商品附件管理接口
"""
from
common.common_func
import
commonFuc
from
air_case.cmdc_login.后台管理系统登录.后台管理系统登录
import
CmdcDoLogin
import
requests
import
json
module
=
"cmdc_product_attachment"
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"url1"
)
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
,
"payload1"
)
"""
场景:商品附件管理()
用例名称:商品附件管理查询所有产品线名称(商品附件管理)
输出:{"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
,
"checkDict1"
)
print
(
check_dict
)
# 断言实际结果中是否包含预期结果的内容
commonFuc
().
check_result
(
check_dict
,
result
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
data/cmdc_product_attachment/data
0 → 100644
+
21
-
0
View file @
3352dedb
#后台运营管理系统登录信息(上海公司)
"username": "Admin00111"
"password": "Aa123456"
json_headers: {
"Content-Type": "application/json",
"Cmdc_access_token": "%s"
}
#商品附件管理查询所有产品线名称
"url1": "/product/public/queryProductLineNameByAll"
"payload1": filialeCode=00111
#预期结果
checkDict1: {"success":true,"code":"200","message":"OK"}
#商品附件管理查询上传产品文件
"url2": "/product/public/queryUploadProductFilePage"
"payload2": {"productLineCode":null,"uploadTimeQuery":[],"fileName":"","enableSign":null,"pageStart":1,"pageSize":10,"total":0}
#预期结果
checkDict2: {"success":true,"code":"200","message":"OK"}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets