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
de66a797
Commit
de66a797
authored
May 25, 2021
by
fanxun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更改注册用例数据
parent
5a018bf2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
33 deletions
+38
-33
test_case/bmc/test_accountinfo.py
+38
-33
test_case_data/bmc/bmc_base_info_2021513.xlsx
+0
-0
No files found.
test_case/bmc/test_accountinfo.py
View file @
de66a797
...
...
@@ -12,39 +12,44 @@ from common.tools import request_main
from
config
import
BMCConfig
@allure.feature
(
"账号信息基本功能"
)
class
TestLogin
():
workBook
=
xlrd
.
open_workbook
(
f
'{BMCConfig.root_path}/test_case_data/bmc/bmc_login_20210513.xlsx'
)
@allure.story
(
"登录"
)
@allure.severity
(
""
)
@allure.title
(
"{inData[testPoint]}"
)
@allure.testcase
(
"{inData[yapiAddress]}"
)
@allure.description
(
"url:/auth/login 。。。。"
)
@pytest.mark.parametrize
(
"inData"
,
get_excelData
(
workBook
,
'登录'
,
'login'
))
def
test_login
(
self
,
inData
):
url
=
f
"{BMCConfig().host}{inData['url']}"
method
=
inData
[
'method'
]
req_data
=
inData
[
'reqData'
]
expectData
=
inData
[
'expectData'
]
headers
=
config
.
BMCConfig
.
loginheader
res
=
request_main
(
url
=
url
,
headers
=
headers
,
method
=
method
,
data
=
req_data
,
has_token
=
True
)
print
(
res
)
assert
res
[
'code'
]
==
expectData
[
'code'
]
@allure.story
(
"激活"
)
@allure.link
(
""
)
@allure.description
(
"/user/credit/idAuth"
)
@allure.title
(
"{inData[testPoint]}"
)
@pytest.mark.parametrize
(
"inData"
,
get_excelData
(
workBook
,
'登录'
,
'Active'
))
def
test_active
(
self
,
inData
):
url
=
f
"{BMCConfig().host}{inData['url']}"
method
=
inData
[
'method'
]
req_data
=
inData
[
'reqData'
]
expectData
=
inData
[
'expectData'
]
headers
=
config
.
BMCConfig
.
headers
res
=
request_main
(
url
=
url
,
headers
=
headers
,
method
=
method
,
data
=
req_data
)
print
(
res
)
assert
res
[
'code'
]
==
expectData
[
'code'
]
# @allure.feature("账号信息基本功能")
# class TestLogin():
# workBook = xlrd.open_workbook(f'{BMCConfig.root_path}/test_case_data/bmc/bmc_login_20210513.xlsx')
# @allure.story("登录")
# @allure.severity("")
# @allure.title("{inData[testPoint]}")
# @allure.testcase("{inData[yapiAddress]}")
# @allure.description("url:/auth/login 。。。。")
# @pytest.mark.parametrize("inData", get_excelData(workBook,'登录', 'login'))
# def test_login(self,inData):
# url = f"{BMCConfig().host}{inData['url']}"
# method = inData['method']
# req_data = inData['reqData']
# expectData = inData['expectData']
# headers = config.BMCConfig.loginheader
# res = request_main(url= url,headers = headers,method =method,data = req_data,has_token=True)
# assert res['code'] == expectData['code']
#
# @allure.story("激活")
# @allure.link("")
# @allure.description("/user/credit/idAuth")
# @allure.title("{inData[testPoint]}")
# @pytest.mark.parametrize("inData", get_excelData(workBook, '登录', 'Active'))
# def test_active(self,inData):
# url = f"{BMCConfig().host}{inData['url']}"
# method = inData['method']
# req_data = inData['reqData']
# expectData = inData['expectData']
# headers = config.BMCConfig.headers
# res = request_main(url=url, headers=headers, method=method, data=req_data)
# assert res['code'] == expectData['code']
class
TestRegister
():
"""注册"""
workBook
=
xlrd
.
open_workbook
(
f
'{BMCConfig.root_path}/test_case_data/bmc/bmc_base_info_2021513.xlsx'
)
if
__name__
==
'__main__'
:
pytest
.
main
([
'-s'
,
'-v'
,
'test_accountinfo.py'
,
...
...
test_case_data/bmc/bmc_base_info_2021513.xlsx
View file @
de66a797
No preview for this file type
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