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
c815fb9f
Commit
c815fb9f
authored
Aug 25, 2021
by
taoke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[交委项目]修改--风险中因查询sql写错,引起的新增备注用例失败
parent
d90e4967
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
test_case/safe_transportation/jgd/test_riskManagement.py
+8
-6
No files found.
test_case/safe_transportation/jgd/test_riskManagement.py
View file @
c815fb9f
...
...
@@ -59,12 +59,12 @@ def riskPointdelete():
class
TestRiskMan
():
workBook
=
xlrd
.
open_workbook
(
f
'{BaseConfig.root_path}/test_case_data/safe_transportation/jgd_riskCase.xlsx'
)
@pytest.mark.run
(
order
=
661
)
# 需要在绑定用例之后
# @pytest.mark.run(order=661)
@allure.story
(
"风险规则配置"
)
@allure.title
(
"{inData[testPoint]}"
)
@allure.testcase
(
"http://yapi.hikcreate.com/project/336/interface/api/73931"
)
@pytest.mark.parametrize
(
"inData"
,
get_excelData
(
workBook
,
"风险管理中心"
,
"riskSave"
))
def
test_
riskP
ointsave
(
self
,
inData
):
def
test_
1riskp
ointsave
(
self
,
inData
):
url
=
f
"{SafeTransportationConfig().SSO_url}{inData['url']}"
headers
=
inData
[
'headers'
]
method
=
inData
[
'method'
]
...
...
@@ -78,10 +78,10 @@ class TestRiskMan():
def
riskPointID
(
self
):
"""返回新增的测试数据的id"""
mysql
=
MYSQL
(
*
BaseConfig
.
test_mysql
)
info
=
mysql
.
ExecuQuery
(
"select id from db_tbd_base1.risk_info where risk_name
='自动化新增
';"
)
info
=
mysql
.
ExecuQuery
(
"select id from db_tbd_base1.risk_info where risk_name
like '自动化新增
%
';"
)
return
info
[
0
][
'id'
]
@allure.story
(
"风险规则配置"
)
@allure.story
(
"风险规则配置"
)
# 编辑
@allure.title
(
"{inData[testPoint]}"
)
@allure.testcase
(
"http://yapi.hikcreate.com/project/336/interface/api/73931"
)
@pytest.mark.parametrize
(
"inData"
,
get_excelData
(
workBook
,
"风险管理中心"
,
"riskupdateSave"
))
...
...
@@ -160,7 +160,7 @@ class TestRiskMan():
allure
.
attach
(
f
"{res}"
,
"响应结果"
,
allure
.
attachment_type
.
TEXT
)
assert
res
[
'code'
]
==
expectData
[
'code'
]
@pytest.mark.run
(
order
=
662
)
# 设置顺序为了在新增风险后执行
@allure.story
(
"风险备注配置"
)
@allure.title
(
"{inData[testPoint]}"
)
# @allure.testcase("")
...
...
@@ -219,6 +219,7 @@ 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'
,
'-
m'
,
'pppp'
,
'-
-alluredir'
,
'../../../report/tmp'
])
pytest
.
main
([
'test_riskManagement.py'
,
'-s'
,
'--alluredir'
,
'../../../report/tmp'
])
# 启动默认浏览器打开报告
os
.
system
(
'allure serve ../../../report/tmp'
)
\ No newline at end of file
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