Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
InterfaceAutoTest
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TestAuto
InterfaceAutoTest
Commits
1af403e2
Commit
1af403e2
authored
May 19, 2021
by
taoke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加信用权益 测试用例模块
parent
5b06cc05
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
0 deletions
+40
-0
config.py
+1
-0
test_case/bmc/test_creditRight.py
+39
-0
test_case_data/bmc/bmc_credit_right_2021513.xlsx
+0
-0
No files found.
config.py
View file @
1af403e2
...
@@ -28,6 +28,7 @@ class BMCConfig(BaseConfig):
...
@@ -28,6 +28,7 @@ class BMCConfig(BaseConfig):
test_case_data_dir
=
"test_case_data/bmc/"
test_case_data_dir
=
"test_case_data/bmc/"
bmcphone
=
"17822000000"
#已激活已有车
bmcphone
=
"17822000000"
#已激活已有车
Registerphone
=
"17822220000"
#未注册用户
Registerphone
=
"17822220000"
#未注册用户
NoactivePhone
=
"17811000000 "
# 未激活用户
encodedGesture
=
"67e6d10010533eed4bbe9659863bf6ee"
encodedGesture
=
"67e6d10010533eed4bbe9659863bf6ee"
bmc_login_url
=
"http://testbmcapp.hikcreate.com/v1/user/login/gesture"
bmc_login_url
=
"http://testbmcapp.hikcreate.com/v1/user/login/gesture"
bmc_token
=
""
#公网加密token
bmc_token
=
""
#公网加密token
...
...
test_case/bmc/test_creditRight.py
0 → 100644
View file @
1af403e2
#作者: taoke
#时间: 2021/5/19 10:52
#编码: -- coding: utf-8 --
#版本: !python3.7
import
pytest
,
allure
,
xlrd
,
requests
,
os
from
common.utils.getExcelData
import
get_excelData
from
service.login
import
BMY
from
common.tools
import
request_main
from
config
import
BaseConfig
,
BMCConfig
from
service.login
import
BMC
from
common.db
import
RedisString
,
MYSQL
"""环境初始化和清除"""
# 1.headers获取
headers
=
BMCConfig
.
headers
headers
[
'Pvt-Token'
]
=
BMCConfig
.
bmc_pvt_token
headers
[
'Token'
]
=
BMCConfig
.
bmc_token
@allure.epic
(
"信用权益"
)
class
TestCreditRight
():
workBook
=
xlrd
.
open_workbook
(
f
'{BaseConfig.root_path}/test_case_data/bmc/bmc_credit_right_2021513.xlsx'
)
@allure.story
(
"未激活用户信用权益获取"
)
@allure.link
(
'http://yapi.hikcreate.com/project/31/interface/api/74396'
,
name
=
'点我看接口文档'
)
@allure.description
(
"/creditRight/v2/index"
)
@allure.title
(
"{inData[testPoint]}"
)
@pytest.mark.parametrize
(
"inData"
,
get_excelData
(
workBook
,
'信用权益'
,
'creditRightIndex'
))
def
test_creditRightIndex
(
self
,
inData
):
# url = f"{BMCConfig().pvthost}{inData['url']}"
# method = inData['method']
# req_data = inData['reqData']
# expectData = inData['expectData']
# headers = inData['headers']
# """请求"""
# res = request_main(url, headers, method, req_data)
# """断言"""
# assert res['code'] == expectData['code']
pass
test_case_data/bmc/bmc_credit_right_2021513.xlsx
0 → 100644
View file @
1af403e2
File added
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