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
ALuo
InterfaceAutoTest
Commits
375df3b4
Commit
375df3b4
authored
Nov 08, 2023
by
ALuo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更改用例测试
parent
9ac8d080
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
interfaceAutoTest/test_case/test_case_aluo/__pycache__/test_bpm.cpython-310-pytest-7.4.3.pyc
+0
-0
interfaceAutoTest/test_case/test_case_aluo/test_bpm.py
+4
-3
No files found.
interfaceAutoTest/test_case/test_case_aluo/__pycache__/test_bpm.cpython-310-pytest-7.4.3.pyc
View file @
375df3b4
No preview for this file type
interfaceAutoTest/test_case/test_case_aluo/test_bpm.py
View file @
375df3b4
...
@@ -16,6 +16,8 @@ from interfaceAutoTest.common.read_excel import ReadExcel
...
@@ -16,6 +16,8 @@ from interfaceAutoTest.common.read_excel import ReadExcel
class
TestBPM
:
class
TestBPM
:
read_excel
=
ReadExcel
(
"aluo"
,
"BPM-aluo"
)
@allure.epic
(
"BPM-ALuo"
)
@allure.epic
(
"BPM-ALuo"
)
@pytest.mark.parametrize
(
"case_module, case_api, case_title, case_level, case_url, "
@pytest.mark.parametrize
(
"case_module, case_api, case_title, case_level, case_url, "
"case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key, row"
,
ReadExcel
()
.
get_datas
())
"case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key, row"
,
ReadExcel
()
.
get_datas
())
...
@@ -43,12 +45,11 @@ class TestBPM:
...
@@ -43,12 +45,11 @@ class TestBPM:
for
key
in
expect_data
:
for
key
in
expect_data
:
assert
expect_data
[
key
]
==
res
.
json
()[
key
]
assert
expect_data
[
key
]
==
res
.
json
()[
key
]
except
:
except
:
ReadExcel
()
.
write_excel
(
result
=
"断言失败"
,
row
=
row
)
TestBPM
.
read_excel
.
write_excel
(
result
=
"断言失败"
,
row
=
row
)
alog
.
error
(
case_title
+
" 断言失败,因为 "
+
res
.
text
+
" 用例数据:"
+
case_data
+
" 期望数据:"
+
expect_data
)
alog
.
error
(
case_title
+
" 断言失败,因为 "
+
res
.
text
+
" 用例数据:"
+
case_data
+
" 期望数据:"
+
expect_data
)
raise
AssertionError
(
"断言失败"
)
raise
AssertionError
(
"断言失败"
)
else
:
else
:
print
(
"断言成功"
)
TestBPM
.
read_excel
.
write_excel
(
result
=
"断言成功"
,
row
=
row
)
ReadExcel
()
.
write_excel
(
result
=
"断言成功"
,
row
=
row
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
pytest
.
main
()
pytest
.
main
()
...
...
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