Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
backend_auto
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
邓莹莹
backend_auto
Commits
3c468449
Commit
3c468449
authored
Aug 20, 2021
by
张淑琴
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'common_dev' into zzsq_dev
parents
d993b547
312a0424
Hide whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
554 additions
and
61 deletions
+554
-61
filter_request.py
all_backend_api/filter_request.py
+1
-3
visual_beauty_card.py
all_backend_api/visual_beauty_card.py
+4
-5
visual_request.py
all_backend_api/visual_request.py
+14
-0
visual_request.yaml
all_backend_api/visual_request.yaml
+11
-0
web_request.py
all_doctor_api/web_request.py
+17
-0
web_request.yaml
all_doctor_api/web_request.yaml
+32
-0
achelous_request.py
all_om_api/achelous_request.py
+38
-2
achelous_request.yaml
all_om_api/achelous_request.yaml
+47
-0
path_setting.py
path_setting.py
+21
-0
test_service_home_city_v2.py
test_backend_case/filter_case/test_service_home_city_v2.py
+8
-5
test_beautycard_filters.py
...d_case/visual_beauty_card_case/test_beautycard_filters.py
+10
-7
test_beautycard_skus.py
...kend_case/visual_beauty_card_case/test_beautycard_skus.py
+18
-7
test_visual_beauty_card_services.py
...sual_beauty_card_case/test_visual_beauty_card_services.py
+29
-5
__init__.py
test_backend_case/visual_case/__init__.py
+0
-0
test_service_list.py
test_backend_case/visual_case/test_service_list.py
+19
-0
service_home_city_v2.yaml
test_backend_data/filter_data/service_home_city_v2.yaml
+14
-3
change_pwdd.yaml
test_backend_data/user_data/change_pwdd.yaml
+8
-0
beautycard_filters.yaml
...kend_data/visual_beauty_card_data/beautycard_filters.yaml
+19
-6
beautycard_skus.yaml
...backend_data/visual_beauty_card_data/beautycard_skus.yaml
+36
-10
visual_beauty_card_services.yaml
.../visual_beauty_card_data/visual_beauty_card_services.yaml
+25
-8
__init__.py
test_backend_data/visual_data/__init__.py
+0
-0
service_list.yaml
test_backend_data/visual_data/service_list.yaml
+8
-0
test_doctor_doctorlist.py
test_doctor_case/web_case/test_doctor_doctorlist.py
+19
-0
test_doctor_verificationcode.py
test_doctor_case/web_case/test_doctor_verificationcode.py
+21
-0
doctor_doctorlist.yaml
test_doctor_data/web_data/doctor_doctorlist.yaml
+14
-0
doctor_verificationcode.yaml
test_doctor_data/web_data/doctor_verificationcode.yaml
+23
-0
test_catalog_add.py
test_om_case/achelous_case/test_catalog_add.py
+21
-0
test_category_ordering.py
test_om_case/achelous_case/test_category_ordering.py
+19
-0
test_industry_search.py
test_om_case/achelous_case/test_industry_search.py
+19
-0
catalog_add.yaml
test_om_data/achelous_data/catalog_add.yaml
+12
-0
category_ordering.yaml
test_om_data/achelous_data/category_ordering.yaml
+15
-0
industry_search.yaml
test_om_data/achelous_data/industry_search.yaml
+12
-0
No files found.
all_backend_api/filter_request.py
View file @
3c468449
...
...
@@ -8,7 +8,6 @@ class filter_request(BaseRequest):
self
.
data
=
self
.
api_load
(
path_setting
.
FILTER_CONFIG
)
def
service_home_city_v2
(
self
,
current_city_id
,
lat
,
lng
):
print
(
"fgx"
)
self
.
params
[
"current_city_id"
]
=
current_city_id
self
.
params
[
"lat"
]
=
lat
self
.
params
[
"lng"
]
=
lng
...
...
@@ -16,8 +15,7 @@ class filter_request(BaseRequest):
if
__name__
==
'__main__'
:
#城市筛选器
#
城市筛选器
print
(
filter_request
()
.
service_home_city_v2
(
""
,
"40.002"
,
"116.487252"
))
print
(
"fgx"
)
all_backend_api/visual_beauty_card.py
View file @
3c468449
...
...
@@ -10,7 +10,7 @@ class visual_beauty_card_request(BaseRequest):
self
.
data
=
self
.
api_load
(
path_setting
.
BEAUTYCARD_FILTERS_CONFIG
)
#自定义专题-更美次卡橱窗组件商品
def
visual_beauty_card_services
(
self
,
unit_id
,
current_city_id
,
page
,
page_size
,
version
,
device_id
=
'97B6764B-2135-4761-9911-701C38CBC272'
):
def
visual_beauty_card_services
(
self
,
unit_id
,
current_city_id
,
page
,
page_size
,
version
):
self
.
params
[
"unit_id"
]
=
unit_id
self
.
params
[
"current_city_id"
]
=
current_city_id
self
.
params
[
"page"
]
=
page
...
...
@@ -20,7 +20,7 @@ class visual_beauty_card_request(BaseRequest):
return
self
.
api_send
(
self
.
data
[
'visual_beauty_card_services'
])
#自定义专题-更美次卡商品列表筛选器
def
beautycard_filters
(
self
,
unit_id
,
current_city_id
,
version
,
device_id
=
'97B6764B-2135-4761-9911-701C38CBC272'
):
def
beautycard_filters
(
self
,
unit_id
,
current_city_id
,
version
):
self
.
params
[
"unit_id"
]
=
unit_id
self
.
params
[
"current_city_id"
]
=
current_city_id
self
.
params
[
"version"
]
=
version
...
...
@@ -28,7 +28,7 @@ class visual_beauty_card_request(BaseRequest):
return
self
.
api_send
(
self
.
data
[
'beautycard_filters'
])
#自定义专题-更美次卡商品列表组件商品
def
beautycard_skus
(
self
,
unit_id
,
tag_id
,
area
,
sort_type
,
page
,
page_size
,
version
,
device_id
=
'97B6764B-2135-4761-9911-701C38CBC272'
):
def
beautycard_skus
(
self
,
unit_id
,
tag_id
,
area
,
sort_type
,
page
,
page_size
,
version
):
self
.
params
[
"unit_id"
]
=
unit_id
self
.
params
[
"tag_id"
]
=
tag_id
self
.
params
[
"area"
]
=
area
...
...
@@ -37,4 +37,4 @@ class visual_beauty_card_request(BaseRequest):
self
.
params
[
"page_size"
]
=
page_size
self
.
params
[
"version"
]
=
version
return
self
.
api_send
(
self
.
data
[
'beautycard_skus'
])
\ No newline at end of file
return
self
.
api_send
(
self
.
data
[
'beautycard_skus'
])
all_backend_api/visual_request.py
0 → 100644
View file @
3c468449
import
path_setting
from
in_common.base_request
import
BaseRequest
class
visual_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
VISUAL_CONFIG
)
# 签到--其他tab 美购feed
def
service_list
(
self
,
unit_id
,
current_city_id
=
'beijing'
):
self
.
params
[
"unit_id"
]
=
unit_id
self
.
params
[
"current_city_id"
]
=
current_city_id
return
self
.
api_send
(
self
.
data
[
'service_list'
])
\ No newline at end of file
all_backend_api/visual_request.yaml
0 → 100644
View file @
3c468449
#签到--其他tab 美购feed
service_list
:
method
:
GET
url
:
/api/visual/service_list
params
:
#组件id
unit_id
:
${unit_id}
current_city_id
:
${current_city_id}
data
:
{}
json
:
{}
is_Login
:
1
all_doctor_api/web_request.py
View file @
3c468449
...
...
@@ -15,6 +15,23 @@ class web_request(BaseRequest):
def
doctor_submechanisms
(
self
)
:
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"doctor_submechanisms"
])
# 医生后台-商户管理-医生管理列表
def
doctor_doctorlist
(
self
,
doctor_type
):
self
.
params
[
"doctor_type"
]
=
doctor_type
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"doctor_doctorlist"
])
# 医生后台-商户管理-医生管理列表--创建医生发送验证码
def
doctor_verificationcode
(
self
,
phone
):
self
.
params
[
"phone"
]
=
phone
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"doctor_verificationcode"
])
# 医生后台-商户管理-医生管理列表--创建医生上传头像图片
def
file_upload
(
self
,
phone
):
self
.
params
[
"phone"
]
=
phone
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"file_upload"
])
def
service_offline
(
self
,
id
,
csrfmiddlewaretoken
):
self
.
params
[
"id"
]
=
id
self
.
params
[
"csrfmiddlewaretoken"
]
=
csrfmiddlewaretoken
...
...
all_doctor_api/web_request.yaml
View file @
3c468449
...
...
@@ -217,3 +217,34 @@ cpc_community_promote_flows:
data
:
{}
json
:
{}
isLogin
:
1
#需要登录
#医生后台-商户管理-医生管理列表
doctor_doctorlist
:
method
:
get
url
:
/api/web/doctor/doctorlist
params
:
doctor_type
:
${doctor_type}
data
:
{
}
json
:
{
}
isLogin
:
1
#需要登录
#医生后台-商户管理-医生管理列表--创建医生发送验证码
doctor_verificationcode
:
method
:
post
url
:
/api/web/doctor/verificationcode
params
:
{}
data
:
phone
:
${phone}
json
:
{}
isLogin
:
1
#需要登录
#医生后台-商户管理-医生管理列表--创建医生上传头像图片
file_upload
:
method
:
post
url
:
/api/web/file/upload
params
:
{}
data
:
{}
json
:
{}
isLogin
:
1
#需要登录
\ No newline at end of file
all_om_api/achelous_request.py
View file @
3c468449
...
...
@@ -65,8 +65,44 @@ class achelous_request(BaseRequest):
self
.
params
[
"unit"
]
=
unit
return
self
.
api_send
(
self
.
data
[
"unit_update"
])
# OM后台-商业分类管理,后台分类(工业)
def
industry_search
(
self
,
tag_system_type
,
tag_name
,
is_online
,
is_display
,
is_move
,
page
,
size
):
self
.
params
[
"tag_system_type"
]
=
tag_system_type
self
.
params
[
"tag_name"
]
=
tag_name
self
.
params
[
"is_online"
]
=
is_online
self
.
params
[
"is_display"
]
=
is_display
self
.
params
[
"is_move"
]
=
is_move
self
.
params
[
"page"
]
=
page
self
.
params
[
"size"
]
=
size
return
self
.
api_send
(
self
.
data
[
"industry_search"
])
# OM后台-商业分类管理,后台分类(工业),标签排序
def
category_ordering
(
self
,
tag_id
,
tag_type
,
tag_system_type
,
operation_type
):
self
.
params
[
"tag_id"
]
=
tag_id
self
.
params
[
"tag_type"
]
=
tag_type
self
.
params
[
"tag_system_type"
]
=
tag_system_type
self
.
params
[
"operation_type"
]
=
operation_type
return
self
.
api_send
(
self
.
data
[
"category_ordering"
])
def
catalog_add
(
self
,
tag_system_type
,
tag_name
,
father_tag_id
,
child_tag_ids
,
is_online
,
is_display
,
is_move
):
self
.
params
[
"tag_system_type"
]
=
tag_system_type
self
.
params
[
"tag_name"
]
=
tag_name
self
.
params
[
"father_tag_id"
]
=
father_tag_id
self
.
params
[
"child_tag_ids"
]
=
child_tag_ids
self
.
params
[
"is_online"
]
=
is_online
self
.
params
[
"is_display"
]
=
is_display
self
.
params
[
"is_move"
]
=
is_move
return
self
.
api_send
(
self
.
data
[
"catalog_add"
])
if
__name__
==
"__main__"
:
# print(achelous_request().batch_add_service("4176", "73809,23508,33823"))
# print(achelous_request().batch_del_service("4176","7312,7311"))
# print(achelous_request().special_edit("32244157","自定义专题创建1","0","2021-08-01 00:00:00","2021-09-30 00:00:00","1","自定义专题创建1","自定义专题创建1","https://heras.igengmei.com/4d5eef0a-78dd-43b3-98b7-137d2341f106-1628565831259"))
print
(
achelous_request
()
.
special_list
(
'1'
,
'10'
,
''
,
''
,
''
,
''
,
''
,
'1'
,
'0'
,
''
,
''
))
\ No newline at end of file
# print(achelous_request().special_list('1', '10', '', '', '', '', '', '1', '0', '', ''))
# print(achelous_request().industry_search(1,"口腔","all","all","all",1,10))
# print(achelous_request().category_ordering(1002463,1,1,2))
print
(
achelous_request
()
.
catalog_add
(
1
,
"自动化接口测试添加2"
,
15510
,
[],
"false"
,
"false"
,
"false"
))
\ No newline at end of file
all_om_api/achelous_request.yaml
View file @
3c468449
...
...
@@ -89,4 +89,50 @@ unit_update:
order
:
${order}
unit
:
${unit}
json
:
{}
isLogin
:
1
#OM后台-商业分类管理,后台分类(工业)
industry_search
:
method
:
GET
url
:
/achelous/api/industry/search
params
:
tag_system_type
:
${tag_system_type}
tag_name
:
${tag_name}
is_online
:
${is_online}
is_display
:
${is_display}
is_move
:
${is_move}
page
:
${page}
size
:
${size}
data
:
{}
json
:
{}
isLogin
:
1
#OM后台-商业分类管理,后台分类(工业),标签排序
category_ordering
:
method
:
POST
url
:
/achelous/api/category/ordering
params
:
{}
data
:
tag_id
:
${tag_id}
tag_type
:
${tag_type}
tag_system_type
:
${tag_system_type}
operation_type
:
${operation_type}
json
:
{}
isLogin
:
1
#OM后台-商业分类管理,后台分类(工业),添加分类
catalog_add
:
method
:
POST
url
:
/achelous/api/catalog/add
params
:
{}
data
:
tag_system_type
:
${tag_system_type}
tag_name
:
${tag_name}
father_tag_id
:
${father_tag_id}
child_tag_ids
:
${child_tag_ids}
is_online
:
${is_online}
is_display
:
${is_display}
is_move
:
${is_move}
json
:
{}
isLogin
:
1
\ No newline at end of file
path_setting.py
View file @
3c468449
...
...
@@ -156,10 +156,21 @@ SIGN_EXCHANGED = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_dat
SIGN_CALENDAR
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/user_data"
,
"sign_calendar.yaml"
)
# 签到--其他 tab feed --也是总的 visual 配置项
VISUAL_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"visual_request.yaml"
)
VISUAL_SERVICE_LIST
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/visual_data"
,
"service_list.yaml"
)
#搜索首页-热门搜索
KEYWORDS_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"search_request.yaml"
)
KEYWORDS
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/search_data"
,
"keywords.yaml"
)
# 医生后台--医生后台-商户管理-医生管理列表
DOCTORLIST
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"doctor_doctorlist.yaml"
)
# 医生后台-商户管理-医生管理列表--创建医生发送验证码
DOCTOR_VERIIFICATIONCODE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"doctor_verificationcode.yaml"
)
#医生后台-我的商品
SERVICE_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web2_data"
,
"service_list.yaml"
)
...
...
@@ -275,6 +286,16 @@ ORDERS_MY_V2_DATA = os.path.join(BASE_DIR, "backend_auto/test_backend_data/order
#我的订单-各状态订单数量
ORDER_MY_STATUS
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/orders_data"
,
"my_status.yaml"
)
# OM后台-商业分类管理,后台分类(工业)
ACHELOUS_INDUSTRY_SEARCH_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_om_data/achelous_data"
,
"industry_search.yaml"
)
# OM后台-商业分类管理,后台分类(工业)排序
ACHELOUS_CATEGORY_ORDERING_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_om_data/achelous_data"
,
"category_ordering.yaml"
)
# OM后台-商业分类管理,后台分类(工业)排序,添加分类
ACHELOUS_CATEGORY_ADD_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_om_data/achelous_data"
,
"catalog_add.yaml"
)
LOGIN_PASSWD
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/accounts_data"
,
"login_passwd.yaml"
)
LOGIN_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"accounts_request.yaml"
)
...
...
test_backend_case/filter_case/test_service_home_city_v2.py
View file @
3c468449
...
...
@@ -8,12 +8,15 @@ from all_backend_api.filter_request import filter_request
class
TestServiceHomeCityV2
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
FILTER
)
service
homecityv2_case
,
servicehomecity
v2_data
=
get_ids
(
data
,
"service_home_city_v2"
)
service
_home_city_v2_case
,
service_home_city_
v2_data
=
get_ids
(
data
,
"service_home_city_v2"
)
@pytest.mark.parametrize
(
"param"
,
service
homecityv2_data
,
ids
=
servicehomecity
v2_case
)
@pytest.mark.parametrize
(
"param"
,
service
_home_city_v2_data
,
ids
=
service_home_city_
v2_case
)
def
test_service_home_city_v2
(
self
,
param
):
r
=
filter_request
()
.
service_home_city_v2
(
param
[
"current_city_id"
],
param
[
"lat"
],
param
[
"lng"
])
# print('feng=', r)
if
r
[
"error"
]
==
0
:
assert
len
(
r
[
"data"
][
"area"
])
>
0
if
param
[
"current_city_id"
]
==
"worldwide"
:
assert
r
[
"error"
]
==
param
[
"assert_worldwide"
]
if
param
[
"lat"
]
==
"39.98316321398558"
and
param
[
"lng"
]
==
"116.4881236681604"
:
assert
r
[
"data"
][
"recommend"
][
"located"
][
0
][
"id"
]
==
param
[
"assert_beijing"
]
if
param
[
"lat"
]
==
"45.742347"
and
param
[
"lng"
]
==
"126.661669"
:
assert
r
[
"data"
][
"recommend"
][
"located"
][
0
][
"id"
]
==
param
[
"assert_haerbin"
]
test_backend_case/visual_beauty_card_case/test_beautycard_filters.py
View file @
3c468449
...
...
@@ -12,10 +12,14 @@ class TestBeautyCardFilters:
@pytest.mark.parametrize
(
"param"
,
beautycard_filters_data
,
ids
=
beautycard_filters_case
)
def
test_beautycard_filters
(
self
,
param
):
print
(
'次卡商品列表筛选器'
)
r
=
visual_beauty_card_request
()
.
beautycard_filters
(
param
[
"unit_id"
],
param
[
"current_city_id"
],
param
[
"version"
])
if
r
[
"data"
]:
print
(
'次卡商品列表筛选器下拉列表有值'
)
assert
len
(
r
[
"data"
][
"field"
])
!=
param
[
"assert"
]
assert
len
(
r
[
"data"
][
"areas"
])
!=
param
[
"assert"
]
assert
len
(
r
[
"data"
][
"order"
])
!=
param
[
"assert"
]
\ No newline at end of file
if
param
[
"unit_id"
]
==
"20109"
:
assert
len
(
r
[
"data"
])
>
param
[
"assert_spu"
]
assert
len
(
r
[
"data"
][
"field"
])
is
not
None
assert
len
(
r
[
"data"
][
"areas"
])
is
not
None
assert
len
(
r
[
"data"
][
"order"
])
is
not
None
if
param
[
"unit_id"
]
==
"20113"
:
assert
len
(
r
[
"data"
])
>
param
[
"assert_sku"
]
assert
len
(
r
[
"data"
][
"field"
])
is
not
None
assert
len
(
r
[
"data"
][
"areas"
])
is
not
None
assert
len
(
r
[
"data"
][
"order"
])
is
not
None
test_backend_case/visual_beauty_card_case/test_beautycard_skus.py
View file @
3c468449
...
...
@@ -12,12 +12,24 @@ class TestBeautyCardSkus:
@pytest.mark.parametrize
(
"param"
,
beautycard_skus_data
,
ids
=
beautycard_skus_case
)
def
test_beautycard_skus
(
self
,
param
):
print
(
'次卡商品列表组件商品'
)
r
=
visual_beauty_card_request
()
.
beautycard_skus
(
param
[
"unit_id"
],
param
[
"tag_id"
],
param
[
"area"
],
param
[
"sort_type"
],
param
[
"page"
],
param
[
"page_size"
],
param
[
"version"
])
if
r
[
"data"
]:
print
(
'次卡商品列表组件有商品召回'
)
assert
len
(
r
[
"data"
][
"beautycards"
])
!=
param
[
"assert"
]
r
=
visual_beauty_card_request
()
.
beautycard_skus
(
param
[
"unit_id"
],
param
[
"tag_id"
],
param
[
"area"
],
param
[
"sort_type"
],
param
[
"page"
],
param
[
"page_size"
],
param
[
"version"
])
if
r
[
"error"
]
==
0
:
assert
len
(
r
[
"data"
][
"beautycards"
])
>
param
[
"assert"
]
assert
r
[
"message"
]
==
param
[
"assert_message"
]
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_spu_id"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_spu_name"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_sku_id"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_sku_name"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_image"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_origin_price"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_gengmei_price"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"sales_amount"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"gm_url"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"rank"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"has_discount"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_discount_total_payment"
]
is
not
None
else
:
assert
r
[
"message"
]
==
param
[
"assert_message"
]
print
(
'接口出错了'
)
\ No newline at end of file
print
(
'接口出错了'
)
test_backend_case/visual_beauty_card_case/test_visual_beauty_card_services.py
View file @
3c468449
...
...
@@ -12,8 +12,32 @@ class TestVisualBeautyCardServices:
@pytest.mark.parametrize
(
"param"
,
visual_beauty_card_services_data
,
ids
=
visual_beauty_card_services_case
)
def
test_visual_beauty_card_services
(
self
,
param
):
print
(
'次卡橱窗'
)
r
=
visual_beauty_card_request
()
.
visual_beauty_card_services
(
param
[
"unit_id"
],
param
[
"current_city_id"
],
param
[
"page"
],
param
[
"page_size"
],
param
[
"version"
])
if
r
[
"data"
][
"beautycards"
]:
print
(
'次卡橱窗有商品'
)
assert
len
(
r
[
"data"
][
"beautycards"
])
!=
param
[
"assert"
]
\ No newline at end of file
if
param
[
"unit_id"
]
==
"20105"
:
assert
len
(
r
[
"data"
][
"beautycards"
])
>
param
[
"assert_spu"
]
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_spu_id"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_spu_name"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_sku_id"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_sku_name"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_image"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_origin_price"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_gengmei_price"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"sales_amount"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"gm_url"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"rank"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"has_discount"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_discount_total_payment"
]
is
not
None
if
param
[
"unit_id"
]
==
"20106"
:
assert
len
(
r
[
"data"
][
"beautycards"
])
>
param
[
"assert_sku"
]
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_spu_id"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_spu_name"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_sku_id"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_sku_name"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_image"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_origin_price"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_gengmei_price"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"sales_amount"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"gm_url"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"rank"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"has_discount"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_discount_total_payment"
]
is
not
None
\ No newline at end of file
test_backend_case/visual_case/__init__.py
0 → 100644
View file @
3c468449
test_backend_case/visual_case/test_service_list.py
0 → 100644
View file @
3c468449
import
pytest
import
path_setting
from
all_backend_api.visual_request
import
visual_request
from
ids_list
import
get_ids
from
in_common.base_request
import
BaseRequest
class
TestServiceList
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
VISUAL_SERVICE_LIST
)
service_list_case
,
service_list_data
=
get_ids
(
data
,
"service_list"
)
#
@pytest.mark.parametrize
(
"param"
,
service_list_data
,
ids
=
service_list_case
)
def
test_service_list
(
self
,
param
):
r
=
visual_request
()
.
service_list
(
param
[
"unit_id"
])
assert
r
[
"error"
]
==
0
list
=
r
.
get
(
"data"
)
.
get
(
"services"
,[])
assert
len
(
list
)
==
param
[
"len"
]
test_backend_data/filter_data/service_home_city_v2.yaml
View file @
3c468449
#城市筛选器
service_home_city_v2
:
-
case
:
"
城市筛选器接口"
case
:
"
城市筛选器接口
-current_city_id为空case-经纬度北京
"
current_city_id
:
"
"
lat
:
"
39.98316321398558"
lng
:
"
116.4881236681604"
assert_beijing
:
"
beijing"
-
case
:
"
城市筛选器接口-current_city_id为空case-经纬度哈尔滨"
current_city_id
:
"
"
lat
:
"
45.742347"
lng
:
"
126.661669"
assert_haerbin
:
"
haerbin"
-
case
:
"
城市筛选器接口-全部城市case"
current_city_id
:
"
worldwide"
lat
:
"
40.002"
lng
:
"
116.487252"
assert
:
0
assert_worldwide
:
0
...
...
test_backend_data/user_data/change_pwdd.yaml
View file @
3c468449
...
...
@@ -54,3 +54,11 @@ change_pwdd:
repeat_password
:
123456
assert
:
0
-
case
:
"
新用户设置密码-密码不符合要求"
version
:
7.48.0
change_type
:
0
password
:
{}
new_password
:
123456
repeat_password
:
123456
assert
:
"
密码应包含数字、大小写字母、特殊字符的两种或两种以上"
test_backend_data/visual_beauty_card_data/beautycard_filters.yaml
View file @
3c468449
...
...
@@ -4,13 +4,26 @@ beautycard_filters:
case
:
"
更美次卡商品列表组件筛选器-按SPU导入,筛选器接口正常"
unit_id
:
"
20109"
current_city_id
:
"
beijing"
version
:
"
743.0"
assert
:
0
version
:
"
7.43.0"
assert_spu
:
0
-
#更美次卡商品列表组件筛选器-按SPU导入,筛选器接口正常
case
:
"
更美次卡商品列表组件筛选器-按SPU导入,筛选器接口正常"
unit_id
:
"
20109"
current_city_id
:
"
beijing"
version
:
"
7.43.0"
assert_spu
:
0
-
#更美次卡商品列表组件筛选器-按SKU导入,筛选器接口正常
case
:
"
更美次卡商品列表组件筛选器-按SKU导入,筛选器接口正常"
unit_id
:
"
20113"
current_city_id
:
"
beijing"
version
:
"
7.43.0"
assert_sku
:
0
-
#更美次卡商品列表组件筛选器-按SKU导入,筛选器接口正常
case
:
"
更美次卡商品列表组件筛选器-按SKU导入,筛选器接口正常"
unit_id
:
"
20113"
current_city_id
:
"
beijing"
version
:
"
743.0"
assert
:
0
\ No newline at end of file
version
:
"
7.43.0"
assert_sku
:
0
\ No newline at end of file
test_backend_data/visual_beauty_card_data/beautycard_skus.yaml
View file @
3c468449
...
...
@@ -8,7 +8,7 @@ beautycard_skus:
sort_type
:
"
0"
page
:
"
0"
page_size
:
"
20"
version
:
"
747.0"
version
:
"
7
.
47.0"
assert
:
0
assert_message
:
"
"
...
...
@@ -21,7 +21,7 @@ beautycard_skus:
sort_type
:
"
0"
page
:
"
0"
page_size
:
"
20"
version
:
"
747.0"
version
:
"
7
.
47.0"
assert
:
0
assert_message
:
"
"
...
...
@@ -34,7 +34,7 @@ beautycard_skus:
sort_type
:
"
2"
page
:
"
0"
page_size
:
"
20"
version
:
"
747.0"
version
:
"
7
.
47.0"
assert
:
0
assert_message
:
"
"
...
...
@@ -47,7 +47,7 @@ beautycard_skus:
sort_type
:
"
2"
page
:
"
0"
page_size
:
"
20"
version
:
"
747.0"
version
:
"
7
.
47.0"
assert
:
0
assert_message
:
"
"
...
...
@@ -60,7 +60,7 @@ beautycard_skus:
sort_type
:
"
1"
page
:
"
0"
page_size
:
"
20"
version
:
"
747.0"
version
:
"
7
.
47.0"
assert
:
0
assert_message
:
"
"
...
...
@@ -73,7 +73,7 @@ beautycard_skus:
sort_type
:
"
1"
page
:
"
0"
page_size
:
"
20"
version
:
"
747.0"
version
:
"
7
.
47.0"
assert
:
0
assert_message
:
"
"
...
...
@@ -86,7 +86,7 @@ beautycard_skus:
sort_type
:
"
3"
page
:
"
0"
page_size
:
"
20"
version
:
"
747.0"
version
:
"
7
.
47.0"
assert
:
0
assert_message
:
"
"
...
...
@@ -99,7 +99,7 @@ beautycard_skus:
sort_type
:
"
3"
page
:
"
0"
page_size
:
"
20"
version
:
"
747.0"
version
:
"
7
.
47.0"
assert
:
0
assert_message
:
"
"
...
...
@@ -112,7 +112,7 @@ beautycard_skus:
sort_type
:
"
2"
page
:
"
0"
page_size
:
"
20"
version
:
"
747.0"
version
:
"
7
.
47.0"
assert
:
0
assert_message
:
"
"
...
...
@@ -125,6 +125,32 @@ beautycard_skus:
sort_type
:
"
1"
page
:
"
0"
page_size
:
"
20"
version
:
"
747.0"
version
:
"
7.47.0"
assert
:
0
assert_message
:
"
"
-
#更美次卡商品列表组件商品-按SPU导入,接口返回字段正常case
case
:
"
更美次卡商品列表组件商品-按SPU导入,接口返回字段正常case"
unit_id
:
"
20109"
tag_id
:
"
-1"
area
:
"
worldwide"
sort_type
:
"
0"
page
:
"
0"
page_size
:
"
20"
version
:
"
7.47.0"
assert
:
0
assert_message
:
"
"
-
#更美次卡商品列表组件商品-按SKU导入,接口返回字段正常case
case
:
"
更美次卡商品列表组件商品-按SKU导入,接口返回字段正常case"
unit_id
:
"
20113"
tag_id
:
"
-1"
area
:
"
worldwide"
sort_type
:
"
0"
page
:
"
0"
page_size
:
"
20"
version
:
"
7.47.0"
assert
:
0
assert_message
:
"
"
test_backend_data/visual_beauty_card_data/visual_beauty_card_services.yaml
View file @
3c468449
visual_beauty_card_services
:
-
#更美次卡橱窗-按SPU导入,定位北京,商品正常召回
case
:
"
更美次卡橱窗-按SPU导入,定位北京,商品正常召回"
case
:
"
更美次卡橱窗-按SPU导入,定位北京,商品正常召回
case
"
unit_id
:
"
20105"
current_city_id
:
"
beijing"
page
:
"
0"
page_size
:
"
50"
version
:
"
743.0"
assert
:
0
version
:
"
7.43.0"
assert_spu
:
0
-
#更美次卡橱窗-按SPU导入,定位北京,接口字段返回正常
case
:
"
更美次卡橱窗-按SPU导入,定位北京,接口字段返回正常case"
unit_id
:
"
20105"
current_city_id
:
"
beijing"
page
:
"
0"
page_size
:
"
50"
version
:
"
7.43.0"
assert_spu
:
0
-
#更美次卡橱窗-按SKU导入,定位北京,商品正常召回
case
:
"
更美次卡橱窗-按SKU导入,定位北京,商品正常召回"
case
:
"
更美次卡橱窗-按SKU导入,定位北京,商品正常召回case"
unit_id
:
"
20106"
current_city_id
:
"
beijing"
page
:
"
0"
page_size
:
"
50"
version
:
"
7.43.0"
assert_sku
:
0
-
#更美次卡橱窗-按SKU导入,定位北京,接口字段返回正常
case
:
"
更美次卡橱窗-按SKU导入,定位北京,接口字段返回正常case"
unit_id
:
"
20106"
current_city_id
:
"
beijing"
page
:
"
0"
page_size
:
"
50"
version
:
"
743.0"
assert
:
0
\ No newline at end of file
version
:
"
7.43.0"
assert_sku
:
0
\ No newline at end of file
test_backend_data/visual_data/__init__.py
0 → 100644
View file @
3c468449
test_backend_data/visual_data/service_list.yaml
0 → 100644
View file @
3c468449
#签到--其他tab 美购feed
service_list
:
-
case
:
"
签到--其他tab
美购feed
校验返回数据数"
assert
:
0
len
:
10
unit_id
:
17923
\ No newline at end of file
test_doctor_case/web_case/test_doctor_doctorlist.py
0 → 100644
View file @
3c468449
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_doctor_api.web_request
import
web_request
class
TestDoctorDoctorlist
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
DOCTORLIST
)
doctor_doctorlist_case
,
doctor_doctorlist_data
=
get_ids
(
data
,
"doctor_doctorlist"
)
@pytest.mark.parametrize
(
"param"
,
doctor_doctorlist_data
,
ids
=
doctor_doctorlist_case
)
def
test_doctor_doctorlist
(
self
,
param
):
'''医生列表'''
r
=
web_request
()
.
doctor_doctorlist
(
param
[
'doctor_type'
])
assert
r
[
"error"
]
==
0
assert
r
[
"data"
][
'doctors'
]
is
not
None
and
type
(
r
[
"data"
][
'doctors'
])
is
list
test_doctor_case/web_case/test_doctor_verificationcode.py
0 → 100644
View file @
3c468449
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_doctor_api.web_request
import
web_request
class
TestDoctorVerificationcode
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
DOCTOR_VERIIFICATIONCODE
)
doctor_verificationcode_case
,
doctor_verificationcode_data
=
get_ids
(
data
,
"doctor_verificationcode"
)
@pytest.mark.parametrize
(
"param"
,
doctor_verificationcode_data
,
ids
=
doctor_verificationcode_case
)
def
test_doctor_verificationcode
(
self
,
param
):
'''医生列表'''
r
=
web_request
()
.
doctor_verificationcode
(
param
[
'phone'
])
assert
r
[
"error"
]
==
0
assert
r
[
'data'
][
'code'
]
==
param
[
"code"
]
assert
r
[
'data'
][
'message'
]
==
param
[
"message"
]
test_doctor_data/web_data/doctor_doctorlist.yaml
0 → 100644
View file @
3c468449
doctor_doctorlist
:
#医生后台-商户管理-医生管理列表case
-
case
:
"
医生后台-商户管理-医生管理列表--已创建"
assert_size
:
10
assert
:
10
doctor_type
:
0
-
case
:
"
医生后台-商户管理-医生管理列表--审核中"
assert_size
:
10
assert
:
10
doctor_type
:
1
\ No newline at end of file
test_doctor_data/web_data/doctor_verificationcode.yaml
0 → 100644
View file @
3c468449
doctor_verificationcode
:
#医生后台-商户管理-医生管理列表--创建医生--医生发送验证码case
-
case
:
"
医生后台-商户管理-医生管理列表--创建医生--医生发送验证码--发送不存在的用户的手机号"
assert_size
:
10
assert
:
10
phone
:
12341234124
message
:
'
请先用该号码在更美pc站或者app注册更美用户账号!'
code
:
1
-
case
:
"
医生后台-商户管理-医生管理列表--创建医生--医生发送验证码--发送存在的用户但是已经是医生账号的手机号"
assert_size
:
10
assert
:
10
phone
:
12345654321
message
:
'
该手机号已经注册为医生或机构,请更换手机号重新注册!'
code
:
1
-
case
:
"
医生后台-商户管理-医生管理列表--创建医生--医生发送验证码--发送存在的用户但不是医生账号的手机号"
assert_size
:
10
assert
:
10
phone
:
12341234121
message
:
'
发送成功!'
code
:
0
test_om_case/achelous_case/test_catalog_add.py
0 → 100644
View file @
3c468449
import
pytest
import
path_setting
from
all_om_api.achelous_request
import
achelous_request
from
ids_list
import
get_ids
from
in_common.base_request
import
BaseRequest
class
TestCategortAdd
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
ACHELOUS_CATEGORY_ADD_DATA
)
catalog_add_case
,
catalog_add_data
=
get_ids
(
data
,
'catalog_add'
)
@pytest.mark.parametrize
(
"param"
,
catalog_add_data
,
ids
=
catalog_add_case
)
def
test_category_add
(
self
,
param
):
import
datetime
dt
=
datetime
.
datetime
.
now
()
.
strftime
(
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S'
)
r
=
achelous_request
()
.
catalog_add
(
param
[
"tag_system_type"
],
param
[
"tag_name"
]
+
dt
,
param
[
"father_tag_id"
],
param
[
"child_tag_ids"
],
param
[
"is_online"
],
param
[
"is_display"
],
param
[
"is_move"
])
print
(
r
)
test_om_case/achelous_case/test_category_ordering.py
0 → 100644
View file @
3c468449
import
pytest
import
path_setting
from
all_om_api.achelous_request
import
achelous_request
from
ids_list
import
get_ids
from
in_common.base_request
import
BaseRequest
class
TestCategortOrdering
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
ACHELOUS_CATEGORY_ORDERING_DATA
)
category_ordering_case
,
category_ordering_data
=
get_ids
(
data
,
'category_ordering'
)
@pytest.mark.parametrize
(
"param"
,
category_ordering_data
,
ids
=
category_ordering_case
)
def
test_category_ordering
(
self
,
param
):
r
=
achelous_request
()
.
category_ordering
(
param
[
"tag_id"
],
param
[
"tag_type"
],
param
[
"tag_system_type"
],
param
[
"operation_type"
])
print
(
r
)
if
r
[
"code"
]
==
0
and
r
[
"msg"
]
==
"success"
:
assert
len
(
r
[
"data"
])
>
0
test_om_case/achelous_case/test_industry_search.py
0 → 100644
View file @
3c468449
import
pytest
import
path_setting
from
all_om_api.achelous_request
import
achelous_request
from
ids_list
import
get_ids
from
in_common.base_request
import
BaseRequest
class
TestIndustrySearch
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
ACHELOUS_INDUSTRY_SEARCH_DATA
)
industry_search_case
,
industry_search_data
=
get_ids
(
data
,
'industry_search'
)
@pytest.mark.parametrize
(
"param"
,
industry_search_data
,
ids
=
industry_search_case
)
def
test_industry_search
(
self
,
param
):
r
=
achelous_request
()
.
industry_search
(
param
[
"tag_system_type"
],
param
[
"tag_name"
],
param
[
"is_online"
],
param
[
"is_display"
],
param
[
"is_move"
],
param
[
"page"
],
param
[
"size"
])
# print(r)
if
r
[
"code"
]
==
0
and
r
[
"msg"
]
==
"success"
:
assert
len
(
r
[
"data"
][
"data"
])
>
0
test_om_data/achelous_data/catalog_add.yaml
0 → 100644
View file @
3c468449
#OM后台-商业分类管理,后台分类(工业),添加分类
catalog_add
:
-
case
:
'
工业分类,增加分类'
tag_system_type
:
1
tag_name
:
"
自动化接口测试添加"
father_tag_id
:
15510
child_tag_ids
:
[]
is_online
:
"
false"
is_display
:
"
false"
is_move
:
"
false"
\ No newline at end of file
test_om_data/achelous_data/category_ordering.yaml
0 → 100644
View file @
3c468449
#OM后台-商业分类管理,后台分类(工业),标签排序
category_ordering
:
-
case
:
'
后台分类(工业)
上升'
tag_id
:
1002463
tag_type
:
1
tag_system_type
:
1
operation_type
:
1
-
case
:
'
后台分类(工业)
下降'
tag_id
:
1002463
tag_type
:
1
tag_system_type
:
1
operation_type
:
2
\ No newline at end of file
test_om_data/achelous_data/industry_search.yaml
0 → 100644
View file @
3c468449
#OM后台-商业分类管理,后台分类(工业)
industry_search
:
-
case
:
'
搜索口腔标签'
tag_system_type
:
1
tag_name
:
"
白"
is_online
:
"
all"
is_display
:
"
all"
is_move
:
"
all"
page
:
1
size
:
10
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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