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
6a945a9f
Commit
6a945a9f
authored
Aug 25, 2021
by
taoke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[交委项目]新增风险管理相关用例
parent
ea9f6cad
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletions
+19
-1
test_case/safe_transportation/jgd/test_riskManagement.py
+19
-1
test_case_data/safe_transportation/jgd_riskCase.xlsx
+0
-0
No files found.
test_case/safe_transportation/jgd/test_riskManagement.py
View file @
6a945a9f
...
...
@@ -173,10 +173,27 @@ class TestRiskMan():
allure
.
attach
(
f
"{res}"
,
"响应结果"
,
allure
.
attachment_type
.
TEXT
)
assert
res
[
'code'
]
==
expectData
[
'code'
]
@pytest.mark.pppp
@allure.story
(
"风险相关"
)
@allure.title
(
"{inData[testPoint]}"
)
# @allure.testcase("")
@pytest.mark.parametrize
(
"inData"
,
get_excelData
(
workBook
,
"风险管理中心"
,
"riskTogeter"
))
def
test_riskTogeter
(
self
,
inData
):
url
=
f
"{SafeTransportationConfig().SSO_url}{inData['url']}"
headers
=
inData
[
'headers'
]
method
=
inData
[
'method'
]
data
=
inData
[
'reqData'
]
expectData
=
inData
[
'expectData'
]
res
=
request_main
(
url
,
headers
,
method
,
data
)
allure
.
attach
(
f
"{res}"
,
"响应结果"
,
allure
.
attachment_type
.
TEXT
)
assert
res
[
'code'
]
==
expectData
[
'code'
]
if
__name__
==
'__main__'
:
for
one
in
os
.
listdir
(
'../../../report/tmp'
):
if
'json'
or
'txt'
in
one
:
os
.
remove
(
f
'../../../report/tmp/{one}'
)
pytest
.
main
([
'test_riskManagement.py'
,
'-s'
,
'--alluredir'
,
'../../../report/tmp'
])
pytest
.
main
([
'test_riskManagement.py'
,
'-s'
,
'-m'
,
'pppp'
,
'--alluredir'
,
'../../../report/tmp'
])
# 启动默认浏览器打开报告
os
.
system
(
'allure serve ../../../report/tmp'
)
\ No newline at end of file
test_case_data/safe_transportation/jgd_riskCase.xlsx
View file @
6a945a9f
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