Skip to content
GitLab
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
3763244c
Commit
3763244c
authored
Feb 04, 2024
by
周念东
Browse files
缺货篮管理更新
parent
b4190252
Changes
4
Hide whitespace changes
Inline
Side-by-side
air_case/cmdc_product_stockoutbasket/缺货篮管理.air/缺货篮管理.py
View file @
3763244c
...
...
@@ -14,7 +14,7 @@ import json
module
=
"cmdc_product_stockoutbasket"
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"url
3
"
)
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"url
1
"
)
print
(
url
)
# 获取登录所需账号密码
username
=
commonFuc
().
get_business_data
(
module
,
"username"
)
...
...
@@ -22,7 +22,7 @@ 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
,
"payload
3
"
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload
1
"
)
"""
场景:缺货篮管理(缺货篮管理)
...
...
@@ -34,7 +34,7 @@ result = requests.post(url, json=request_body, headers=headers)
result
=
json
.
loads
(
result
.
content
)
# print(result)
# 获取预期结果
check_dict
=
commonFuc
().
get_business_data
(
module
,
"checkDict
3
"
)
check_dict
=
commonFuc
().
get_business_data
(
module
,
"checkDict
1
"
)
print
(
check_dict
)
# 断言实际结果中是否包含预期结果的内容
commonFuc
().
check_result
(
check_dict
,
result
)
\ No newline at end of file
air_case/cmdc_product_stockoutbasket/缺货篮管理查询公司选项.air/缺货篮管理查询公司选项.py
0 → 100644
View file @
3763244c
# -*- encoding=utf8 -*-
__author__
=
"zhouniandong"
"""
case_tag:cmdc_api,cmdc缺货篮管理查询公司选项,2293,2293-1,sit,bs
主数据平台:运营后台管理系统缺货篮管理接口
"""
from
common.common_func
import
commonFuc
from
air_case.cmdc_login.后台管理系统登录.后台管理系统登录
import
CmdcDoLogin
import
requests
import
json
module
=
"cmdc_product_stockoutbasket"
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
.
get
(
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
air_case/cmdc_product_stockoutbasket/缺货篮管理选择已发布产品类别选项.air/缺货篮管理选择已发布产品类别选项.py
0 → 100644
View file @
3763244c
# -*- encoding=utf8 -*-
__author__
=
"zhouniandong"
"""
case_tag:cmdc_api,cmdc缺货篮管理选择已发布产品类别选项,2293,2293-1,sit,bs
主数据平台:运营后台管理系统缺货篮管理接口
"""
from
common.common_func
import
commonFuc
from
air_case.cmdc_login.后台管理系统登录.后台管理系统登录
import
CmdcDoLogin
import
requests
import
json
module
=
"cmdc_product_stockoutbasket"
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"url3"
)
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
,
"payload3"
)
"""
场景:缺货篮管理(缺货篮管理)
用例名称:缺货篮管理选择已发布产品类别选项(缺货篮管理)
输出:{"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
,
"checkDict3"
)
print
(
check_dict
)
# 断言实际结果中是否包含预期结果的内容
commonFuc
().
check_result
(
check_dict
,
result
)
\ No newline at end of file
data/cmdc_product_stockoutbasket/data
View file @
3763244c
...
...
@@ -7,21 +7,21 @@ json_headers: {
}
#
查询公司配置信息接口地址
"url1": "/user/query
CompanyOptions
"
"payload1": {}
#
缺货篮管理
"url1": "/user/query
StockOutPage
"
"payload1": {
"telephone":"","status":null,"firstCategory":"","secondCategory":"","thirdCategory":"","pageStart":1,"pageSize":10
}
#预期结果
checkDict1: {"success":true,"code":"200","message":"OK"}
#
获取选择已发布商品分类选项接口地址
"url2": "/
product/mall/selectPublishedProductCategor
yOption"
"payload2":
{"disableSign":0,"status":3,"telephone":"","userNo":"","userName":"","customerCompanyName":"","pageSize":10,"pageStart":1,"total":0}
#
缺货篮管理查询公司选项
"url2": "/
user/queryCompan
yOption
s
"
"payload2":
#预期结果
checkDict2: {"success":true,"code":"200","message":"OK"}
#获取查询缺货篮接口地址
"url3": "/
user/queryStockOutPage
"
"payload3": {"
telephone":"","status":null,"firstCategory":"","secondCategory":"","thirdCategory":"","pageStart":1,"pageSize":10
}
"url3": "/
product/mall/selectPublishedProductCategoryOption
"
"payload3": {"
parentId":1
}
#预期结果
checkDict3: {"success":true,"code":"200","message":"OK"}
\ No newline at end of file
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