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
91eabb6b
Commit
91eabb6b
authored
Oct 27, 2021
by
liangyan10
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oms应用管理支付配置
parent
9cff22fa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
14 deletions
+14
-14
test_case/bmy/test_ProductManagement.py
+14
-14
test_case_data/bmy/bmy_oms_ApplicationManagement_20210806.xlsx
+0
-0
No files found.
test_case/bmy/test_ProductManagement.py
View file @
91eabb6b
...
...
@@ -10,20 +10,20 @@ from service.login import BMY
@allure.feature
(
"企业管理"
)
class
TestProductManagement
():
workBook
=
xlrd
.
open_workbook
(
f
'{BmyomsConfig.root_path}/test_case_data/bmy/bmy_oms_ApplicationManagement_20210806.xlsx'
)
#
@allure.story("企业管理")
#
@allure.title("{inData[testPoint]}")
#
@allure.testcase("http://yapi.hikcreate.com/project/364/interface/api/90509")
#
@allure.description("企业订单")
#
@pytest.mark.parametrize("inData", get_excelData(workBook, '企业管理', 'product'))
#
def test_product(self, inData):
#
url = f"{BmyomsConfig().test_host}{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']
@allure.story
(
"企业管理"
)
@allure.title
(
"{inData[testPoint]}"
)
@allure.testcase
(
"http://yapi.hikcreate.com/project/364/interface/api/90509"
)
@allure.description
(
"企业订单"
)
@pytest.mark.parametrize
(
"inData"
,
get_excelData
(
workBook
,
'企业管理'
,
'product'
))
def
test_product
(
self
,
inData
):
url
=
f
"{BmyomsConfig().test_host}{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'
]
@allure.story
(
"企业管理"
)
@allure.title
(
"{inData[testPoint]}"
)
...
...
test_case_data/bmy/bmy_oms_ApplicationManagement_20210806.xlsx
View file @
91eabb6b
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