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
105d5357
Commit
105d5357
authored
Aug 24, 2021
by
taoke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[交委项目]添加风险点查询列表接口
parent
ea558367
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
test_case/safe_transportation/jgd/test_riskManagement.py
+19
-0
test_case_data/safe_transportation/jgd_riskCase.xlsx
+0
-0
No files found.
test_case/safe_transportation/jgd/test_riskManagement.py
View file @
105d5357
...
@@ -93,6 +93,25 @@ class TestRiskMan():
...
@@ -93,6 +93,25 @@ class TestRiskMan():
allure
.
attach
(
f
"{res}"
,
"响应结果"
,
allure
.
attachment_type
.
TEXT
)
allure
.
attach
(
f
"{res}"
,
"响应结果"
,
allure
.
attachment_type
.
TEXT
)
assert
res
[
'code'
]
==
expectData
[
'code'
]
assert
res
[
'code'
]
==
expectData
[
'code'
]
@allure.story
(
"风险规则配置"
)
@allure.title
(
"{inData[testPoint]}"
)
@allure.testcase
(
"http://yapi.hikcreate.com/project/336/interface/api/73931"
)
@allure.description
(
"author:taoke"
)
@pytest.mark.parametrize
(
"inData"
,
get_excelData
(
workBook
,
"风险管理中心"
,
"riskList"
))
def
test_riskList
(
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
)
# 如果通过关键字查询则多个判断
if
inData
[
'frontCondition'
]
==
'关键字:自动化'
:
assert
res
[
'data'
][
'list'
][
0
][
'riskName'
]
.
__contains__
(
"自动化"
)
else
:
assert
res
[
'code'
]
==
expectData
[
'code'
]
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
for
one
in
os
.
listdir
(
'../../../report/tmp'
):
for
one
in
os
.
listdir
(
'../../../report/tmp'
):
...
...
test_case_data/safe_transportation/jgd_riskCase.xlsx
View file @
105d5357
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