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
1380c226
Commit
1380c226
authored
May 24, 2021
by
dengmaosheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
8bd7cd1a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
8 deletions
+6
-8
test_case/bmc/test_accountinfo.py
+6
-8
test_case_data/bmc/bmc_credit_right_2021513.xlsx
+0
-0
test_case_data/bmc/bmc_login_20210513.xlsx
+0
-0
test_case_data/bmc/bmc_testcase_20210513.xlsx
+0
-0
No files found.
test_case/bmc/test_accountinfo.py
View file @
1380c226
...
...
@@ -12,28 +12,26 @@ from common.tools import request_main
from
config
import
BMCConfig
@allure.epic
(
"账号信息基本功能"
)
# @allure.feature("账号信息基本功能")
@allure.feature
(
"登录"
)
class
TestLogin
():
workBook
=
xlrd
.
open_workbook
(
f
'{BMCConfig.root_path}/test_case_data/bmc/bmc_
testcase
_20210513.xlsx'
)
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'
))
@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 = requests.post(url = url,headers =headers,json =req_data )
res
=
request_main
(
url
=
url
,
headers
=
headers
,
method
=
method
,
data
=
req_data
,
has_token
=
True
)
#
print(res)
print
(
res
)
assert
res
[
'code'
]
==
expectData
[
'code'
]
if
__name__
==
'__main__'
:
pytest
.
main
([
'-s'
,
'-v'
,
'test_accountinfo.py'
,
r'--alluredir=D:\项目\接口自动化\InterfaceAutoTest\report'
,
'--clean-alluredir'
])
...
...
test_case_data/bmc/bmc_credit_right_2021513.xlsx
View file @
1380c226
No preview for this file type
test_case_data/bmc/bmc_login_20210513.xlsx
0 → 100644
View file @
1380c226
File added
test_case_data/bmc/bmc_testcase_20210513.xlsx
View file @
1380c226
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