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
287963ca
Commit
287963ca
authored
May 08, 2021
by
taoke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试用例,增加类环境清除
parent
094808a0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
4 deletions
+11
-4
test_case/bmy/test_login.py
+2
-0
test_case/bmy/test_riskMonitar.py
+6
-4
test_case/bmy/test_riskMonitor2.py
+3
-0
No files found.
test_case/bmy/test_login.py
View file @
287963ca
...
...
@@ -50,6 +50,8 @@ class TestLogin():
# assert res.json()['code'] == expectData['code']
"""
def
teardown_class
(
self
):
"""清除"""
if
__name__
==
'__main__'
:
for
one
in
os
.
listdir
(
'../../report/tmp'
):
# 列出对应文件夹的数据
...
...
test_case/bmy/test_riskMonitar.py
View file @
287963ca
...
...
@@ -13,9 +13,8 @@ from service.login import BMY
@allure.feature
(
"风控台"
)
class
TestLogin
():
workBook
=
xlrd
.
open_workbook
(
f
'{BmyConfig.root_path}/test_case_data/bmy/bmy_case.xlsx'
)
def
setup_class
(
self
):
# 每一个类下面所有的方法调用只运行一次
self
.
token
=
BMY
()
.
bmy_login
(
BmyConfig
.
test_name_password
)
# def setup_class(self): # 每一个类下面所有的方法调用只运行一次
# self.token = BMY().bmy_login(BmyConfig.test_name_password)
@allure.story
(
"风险监控列表接口"
)
@allure.title
(
"风险监控列表用例"
)
@allure.testcase
(
"http://yapi.hikcreate.com/"
)
...
...
@@ -29,7 +28,7 @@ class TestLogin():
headers
=
inData
[
'headers'
]
"""处理"""
headers
[
'Authorization'
]
=
self
.
token
headers
[
'Authorization'
]
=
BmyConfig
.
bmy_
token
"""请求"""
res
=
request_main
(
url
,
headers
,
method
,
req_data
)
...
...
@@ -37,6 +36,9 @@ class TestLogin():
"""断言"""
assert
res
[
'code'
]
==
expectData
[
'code'
]
def
teardown_class
(
self
):
"""清除"""
if
__name__
==
'__main__'
:
for
one
in
os
.
listdir
(
'../../report/tmp'
):
# 列出对应文件夹的数据
...
...
test_case/bmy/test_riskMonitor2.py
View file @
287963ca
...
...
@@ -35,7 +35,10 @@ class TestLogin():
"""断言"""
assert
res
[
'code'
]
==
expectData
[
'code'
]
def
teardown_class
(
self
):
"""清除"""
if
__name__
==
'__main__'
:
for
one
in
os
.
listdir
(
'../../report/tmp'
):
# 列出对应文件夹的数据
if
'json'
in
one
:
...
...
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