Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
O
on_line_product
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
邓莹莹
on_line_product
Commits
11ed509f
Commit
11ed509f
authored
Aug 31, 2021
by
邓莹莹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增3个接口
parent
f6ab5789
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
193 additions
and
3 deletions
+193
-3
janus_request.py
all_backend_api/janus_request.py
+11
-0
janus_request.yaml
all_backend_api/janus_request.yaml
+14
-0
service_request.py
all_backend_api/service_request.py
+8
-0
service_request.yaml
all_backend_api/service_request.yaml
+13
-0
visual_request.py
all_backend_api/visual_request.py
+14
-0
visual_request.yaml
all_backend_api/visual_request.yaml
+11
-0
get_cookie.txt
in_common/get_cookie.txt
+2
-2
path_setting.py
path_setting.py
+8
-1
test_product_mall_service_home_feed.py
...nd_case/janus_case/test_product_mall_service_home_feed.py
+22
-0
test_home_feed.py
test_backend_case/service_case/test_home_feed.py
+22
-0
__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
product_mall_service_home_feed.yaml
...ckend_data/janus_data/product_mall_service_home_feed.yaml
+24
-0
home_feed.yaml
test_backend_data/service_data/home_feed.yaml
+17
-0
__init__.py
test_backend_data/visual_data/__init__.py
+0
-0
service_list.yaml
test_backend_data/visual_data/service_list.yaml
+8
-0
No files found.
all_backend_api/janus_request.py
View file @
11ed509f
...
...
@@ -197,6 +197,17 @@ class janus_request(BaseRequest):
return
self
.
api_send
(
self
.
data
[
"service_hospital"
])
# 首页(灰度)feed-推荐商品类型tab[除必要参数外其余参数使用默认参数形式方便之后调整]
def
feed_service
(
self
,
tab_value
,
first_load
,
version
=
'7.42.2'
,
device_id
=
'androidid_49973caa1b578d85'
,
current_city_id
=
'beijing'
):
self
.
params
[
'version'
]
=
version
self
.
params
[
'device_id'
]
=
device_id
self
.
params
[
'tab_value'
]
=
tab_value
self
.
params
[
'current_city_id'
]
=
current_city_id
self
.
params
[
'first_load'
]
=
first_load
return
self
.
api_send
(
self
.
data
[
"feed_service"
])
# 直播-点击【设置封面】
def
page_rules
(
self
,
version
,
current_city_id
,
page_name
,
device_id
=
'97B6764B-2135-4761-9911-701C38CBC272'
):
self
.
params
[
'version'
]
=
version
...
...
all_backend_api/janus_request.yaml
View file @
11ed509f
...
...
@@ -285,6 +285,20 @@ beauty_card_order_detail:
json
:
{}
isLogin
:
1
#首页(灰度)feed-推荐商品类型tab[除必要参数外其余参数使用默认参数形式方便之后调整]
feed_service
:
method
:
get
url
:
/api/janus/product/mall/service_home_feed
params
:
version
:
${version}
device_id
:
${device_id}
current_city_id
:
${current_city_id}
tab_value
:
${tab_value}
first_load
:
${first_load}
data
:
{}
json
:
{}
isLogin
:
0
#直播-点击【设置封面】
page_rules
:
method
:
GET
...
...
all_backend_api/service_request.py
View file @
11ed509f
...
...
@@ -15,6 +15,14 @@ class service_request(BaseRequest):
def
service_favor
(
self
):
return
self
.
api_send
(
self
.
data
[
"service_favor"
])
# 首页(灰度)feed-推荐机构&推荐医生tab[除必要参数外其余参数使用默认参数形式方便之后调整]
def
feed_home
(
self
,
tab_value
,
input_type
,
version
=
'7.42.2'
,
device_id
=
'androidid_49973caa1b578d85'
,
current_city_id
=
'beijing'
):
self
.
params
[
'version'
]
=
version
self
.
params
[
'device_id'
]
=
device_id
self
.
params
[
'tab_value'
]
=
tab_value
self
.
params
[
'current_city_id'
]
=
current_city_id
self
.
params
[
'input_type'
]
=
input_type
return
self
.
api_send
(
self
.
data
[
"feed_home"
])
if
__name__
==
'__main__'
:
print
(
service_request
()
.
home_v5
())
...
...
all_backend_api/service_request.yaml
View file @
11ed509f
...
...
@@ -16,3 +16,16 @@ service_favor:
data
:
{}
json
:
{}
isLogin
:
1
#首页(灰度)feed-推荐机构&推荐医生tab[除必要参数外其余参数使用默认参数形式方便之后调整]
feed_home
:
method
:
get
url
:
/api/service/home/feed
params
:
version
:
${version}
device_id
:
${device_id}
current_city_id
:
${current_city_id}
tab_value
:
${tab_value}
input_type
:
${input_type}
data
:
{}
json
:
{}
all_backend_api/visual_request.py
0 → 100644
View file @
11ed509f
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 @
11ed509f
#签到--其他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
in_common/get_cookie.txt
View file @
11ed509f
_gtid=9025f29e058e11ec9fb57e560ecdb5bc804;sessionid=cjmm2op613qiesltkxnye2pf4lqcj9ny
\ No newline at end of file
_gtid=9dfb609e0a3111ecbe53ce20f19931a34194;sessionid=nbvqfb0p9k8hqdhdr7r7bdlfn4j8dbqk
\ No newline at end of file
path_setting.py
View file @
11ed509f
...
...
@@ -78,8 +78,12 @@ TOPIC_DETAIL = os.path.join(BASE_DIR, "on_line_product/test_backend_data/topic_d
# 日记贴-点赞&取消点赞--详情页内部
TOPIC_VOTE
=
os
.
path
.
join
(
BASE_DIR
,
"on_line_product/test_backend_data/topic_data"
,
"vote.yaml"
)
# 首页feed流tab切换--推荐商品类型tab[除必要参数外其余参数使用默认参数形式方便之后调整]
FEED_TAB_SERVICE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_data"
,
"product_mall_service_home_feed.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"
)
# 帖子详情页内容--也是总的tractate接口的配置
TRACTATE_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"on_line_product/all_backend_api"
,
"tractate_request.yaml"
)
...
...
@@ -221,6 +225,9 @@ GMAI_PLASTIC_CHECCK_STYLE_CLASSTIFY_DATA = os.path.join(BASE_DIR, "on_line_produ
# 3D变脸
GMAI_PLASTIC_ANALYSIS_V2_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"on_line_product/test_backend_data/gmai_data"
,
"plastic_analysis_v2.yaml"
)
# 首页(灰度)feed-推荐机构&推荐医生tab[除必要参数外其余参数使用默认参数形式方便之后调整]
FEED_TAB_SERVICE_DOCTORS
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/service_data"
,
"home_feed.yaml"
)
# 新版本我的美券列表
JANUS_PRODUCT_MY_LIST_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"on_line_product/test_backend_data/janus_data"
,
"product_my_list.yaml"
)
# 我的订单列表
...
...
test_backend_case/janus_case/test_product_mall_service_home_feed.py
0 → 100644
View file @
11ed509f
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.janus_request
import
janus_request
class
TestProductMallServiceHomeFeed
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
FEED_TAB_SERVICE
)
productmallservicehomefeed_case
,
productmallservicehomefeed_data
=
get_ids
(
data
,
"feed_service"
)
@pytest.mark.parametrize
(
"param"
,
productmallservicehomefeed_data
,
ids
=
productmallservicehomefeed_case
)
def
test_product_mall_service_home_feed
(
self
,
param
):
r
=
janus_request
()
.
feed_service
(
param
[
"tab_value"
],
param
[
"first_load"
])
assert
r
[
"error"
]
==
0
if
r
[
"error"
]
==
0
:
features
=
r
.
get
(
"data"
)
.
get
(
"result"
,[])
print
(
len
(
features
))
assert
len
(
features
)
>
param
[
"assert"
]
test_backend_case/service_case/test_home_feed.py
0 → 100644
View file @
11ed509f
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.service_request
import
service_request
class
TestProductMallServiceHomeFeed
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
FEED_TAB_SERVICE_DOCTORS
)
productmallservicehomefeed_case
,
productmallservicehomefeed_data
=
get_ids
(
data
,
"home_feed"
)
@pytest.mark.parametrize
(
"param"
,
productmallservicehomefeed_data
,
ids
=
productmallservicehomefeed_case
)
def
test_product_mall_service_home_feed
(
self
,
param
):
r
=
service_request
()
.
feed_home
(
param
[
"tab_value"
],
param
[
"input_type"
])
assert
r
[
"error"
]
==
0
if
r
[
"error"
]
==
0
:
s
=
param
[
"tab_value"
]
+
"s"
features
=
r
[
"data"
][
s
]
assert
len
(
features
)
>
param
[
"assert"
]
test_backend_case/visual_case/__init__.py
0 → 100644
View file @
11ed509f
test_backend_case/visual_case/test_service_list.py
0 → 100644
View file @
11ed509f
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/janus_data/product_mall_service_home_feed.yaml
0 → 100644
View file @
11ed509f
feed_service
:
#成功登录case
-
case
:
"
请求成功,有数据返回"
current_city_id
:
"
beijing"
tab_value
:
"
choice"
version
:
"
7.42.2"
first_load
:
1
assert
:
0
-
case
:
"
推荐内容/接口请求成功,有数据返回"
current_city_id
:
"
beijing"
tab_value
:
"
home_video"
version
:
"
7.42.2"
first_load
:
1
assert
:
0
-
case
:
"
直播tab接口请求成功,有数据返回"
current_city_id
:
"
beijing"
tab_value
:
"
customize_commodity"
first_load
:
1
version
:
"
7.42.2"
assert
:
0
\ No newline at end of file
test_backend_data/service_data/home_feed.yaml
0 → 100644
View file @
11ed509f
home_feed
:
#成功登录case
-
case
:
"
推荐医生.接口请求成功,有数据返回"
current_city_id
:
"
beijing"
tab_value
:
"
doctor"
version
:
"
7.42.2"
input_type
:
3
assert
:
0
-
case
:
"
推荐医院,接口请求成功,有数据返回"
current_city_id
:
"
beijing"
tab_value
:
"
hospital"
version
:
"
7.42.2"
input_type
:
3
assert
:
0
test_backend_data/visual_data/__init__.py
0 → 100644
View file @
11ed509f
test_backend_data/visual_data/service_list.yaml
0 → 100644
View file @
11ed509f
#签到--其他tab 美购feed
service_list
:
-
case
:
"
签到--其他tab
美购feed
校验返回数据数"
assert
:
0
len
:
10
unit_id
:
17923
\ 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