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
c3959743
Commit
c3959743
authored
May 14, 2021
by
taoke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加电子证照 --修改驾驶证头像 用例
parent
e0bfe97a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
10 deletions
+24
-10
config.py
+1
-1
test_case/bmc/test_ ElectronicLicense.py
+23
-9
test_case_data/bmc/bmc_testcase01_20210513.xlsx
+0
-0
No files found.
config.py
View file @
c3959743
...
...
@@ -33,7 +33,7 @@ class BMCConfig(BaseConfig):
bmc_token
=
""
#公网加密token
bmc_pvt_token
=
""
#专网token
host
=
"http://testbmcapp.hikcreate.com"
#bmc业务所有URL的host
test_
pvthost
=
"http://testbmcpvtapp.hikcreate.com"
pvthost
=
"http://testbmcpvtapp.hikcreate.com"
#bmc除登录外所有的header
headers
=
{
'City-Code'
:
"520100"
,
...
...
test_case/bmc/test_ ElectronicLicense.py
View file @
c3959743
...
...
@@ -25,7 +25,7 @@ class TestDrivingLicense():
@allure.title
(
"{inData[testPoint]}"
)
@pytest.mark.parametrize
(
"inData"
,
get_excelData
(
workBook
,
'电子证照'
,
'dlVehqr'
))
def
test_dlVehQr
(
self
,
inData
):
url
=
f
"{BMCConfig().
test_
pvthost}{inData['url']}"
url
=
f
"{BMCConfig().pvthost}{inData['url']}"
method
=
inData
[
'method'
]
req_data
=
inData
[
'reqData'
]
expectData
=
inData
[
'expectData'
]
...
...
@@ -41,7 +41,7 @@ class TestDrivingLicense():
@allure.title
(
"{inData[testPoint]}"
)
@pytest.mark.parametrize
(
"inData"
,
get_excelData
(
workBook
,
'电子证照'
,
'LicimageStatus'
))
def
test_LicimageStatus
(
self
,
inData
):
url
=
f
"{BMCConfig().
test_
pvthost}{inData['url']}"
url
=
f
"{BMCConfig().pvthost}{inData['url']}"
method
=
inData
[
'method'
]
req_data
=
inData
[
'reqData'
]
expectData
=
inData
[
'expectData'
]
...
...
@@ -51,13 +51,13 @@ class TestDrivingLicense():
"""断言"""
assert
res
[
'code'
]
==
expectData
[
'code'
]
@allure.story
(
"
获取驾驶证图片
状态"
)
@allure.story
(
"
照片审核
状态"
)
@allure.link
(
"http://yapi.hikcreate.com/project/32/interface/api/22759"
)
@allure.description
(
"/drivingLicense/image/status"
)
@allure.description
(
"/drivingLicense/image/
audit/
status"
)
@allure.title
(
"{inData[testPoint]}"
)
@pytest.mark.parametrize
(
"inData"
,
get_excelData
(
workBook
,
'电子证照'
,
'imaAuditStatus'
))
def
test_imaAuditStatus
(
self
,
inData
):
url
=
f
"{BMCConfig().
test_
pvthost}{inData['url']}"
url
=
f
"{BMCConfig().pvthost}{inData['url']}"
method
=
inData
[
'method'
]
req_data
=
inData
[
'reqData'
]
expectData
=
inData
[
'expectData'
]
...
...
@@ -73,7 +73,23 @@ class TestDrivingLicense():
@allure.title
(
"{inData[testPoint]}"
)
@pytest.mark.parametrize
(
"inData"
,
get_excelData
(
workBook
,
'电子证照'
,
'LicenimageText'
))
def
test_LicenimageText
(
self
,
inData
):
url
=
f
"{BMCConfig().test_pvthost}{inData['url']}"
url
=
f
"{BMCConfig().pvthost}{inData['url']}"
method
=
inData
[
'method'
]
req_data
=
inData
[
'reqData'
]
expectData
=
inData
[
'expectData'
]
headers
=
inData
[
'headers'
]
"""请求"""
res
=
request_main
(
url
,
headers
,
method
,
req_data
)
"""断言"""
assert
res
[
'code'
]
==
expectData
[
'code'
]
@allure.story
(
"修改驾驶证头像"
)
@allure.link
(
"http://yapi.hikcreate.com/project/32/interface/api/22750"
)
@allure.description
(
"/drivingLicense/avatar/update"
)
@allure.title
(
"{inData[testPoint]}"
)
@pytest.mark.parametrize
(
"inData"
,
get_excelData
(
workBook
,
'电子证照'
,
'LicenAvaUpdate'
))
def
test_LicenAvaUpdate
(
self
,
inData
):
url
=
f
"{BMCConfig().host}{inData['url']}"
method
=
inData
[
'method'
]
req_data
=
inData
[
'reqData'
]
expectData
=
inData
[
'expectData'
]
...
...
@@ -89,12 +105,10 @@ class TestDrivingLicense():
if
__name__
==
'__main__'
:
for
one
in
os
.
listdir
(
'../../report/tmp'
):
# 列出对应文件夹的数据
if
'json'
in
one
:
os
.
remove
(
f
'../../report/tmp/{one}'
)
pytest
.
main
([
'test_ ElectronicLicense.py'
,
'-s'
,
'--alluredir'
,
'../../report/tmp'
])
# 启动默认浏览器打开报告
#
os.system('allure serve ../../report/tmp')
os
.
system
(
'allure serve ../../report/tmp'
)
test_case_data/bmc/bmc_testcase01_20210513.xlsx
View file @
c3959743
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