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
4ecdccf2
Commit
4ecdccf2
authored
Oct 12, 2021
by
taoke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
安全运输平台---企业端添加用例
parent
ff9253b9
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
4 deletions
+39
-4
config.py
+1
-1
test_case/safe_transportation/jgd/test_archives.py
+0
-2
test_case/safe_transportation/jgd/test_hiddenDanger.py
+1
-1
test_case/safe_transportation/qyd/test_baseData.py
+37
-0
test_case_data/safe_transportation/qyd_baseData.xlsx
+0
-0
No files found.
config.py
View file @
4ecdccf2
...
...
@@ -169,7 +169,7 @@ class SafeTransportationConfig(BaseConfig):
# 企业云
key
=
"Jv+h&c0A"
defaultToken
=
"Basic aHpjcF93ZWI6MTIzNDU2"
test_
host
=
"http://testyun.banmago.com/api"
test_
bmy_host
=
"http://testyun.banmago.com/api"
# 企业端
test_name_password
=
{
"username"
:
"15150000000"
,
"password"
:
"A123456"
,
"Register-Origin"
:
"yun"
}
bmy_token
=
''
# headers = {"Content-Type": "application/json",
...
...
test_case/safe_transportation/jgd/test_archives.py
View file @
4ecdccf2
...
...
@@ -10,8 +10,6 @@ from common.tools import request_main
from
config
import
*
from
service.login
import
BMY
@allure.feature
(
"全息档案"
)
class
TestEnterpriseArchives
():
workBook
=
xlrd
.
open_workbook
(
f
'{BaseConfig.root_path}/test_case_data/safe_transportation/jgd_archives.xlsx'
)
...
...
test_case/safe_transportation/jgd/test_hiddenDanger.py
View file @
4ecdccf2
#__author__:hanxiaojuan
#__time__:2021/8/26
"""
监管中心--
-??
监管中心--
隐患大屏
"""
import
allure
import
pytest
...
...
test_case/safe_transportation/qyd/test_baseData.py
0 → 100644
View file @
4ecdccf2
# autor: taoke
# time : 2021/10/11 11:05
"""
基础数据管理
"""
import
allure
,
xlrd
,
pytest
from
config
import
*
from
common.utils.getExcelData
import
get_excelData
from
common.tools
import
request_main
@allure.feature
(
"企业端-基础数据管理"
)
class
TestEnterpriseArchives
(
):
workBook
=
xlrd
.
open_workbook
(
f
'{BaseConfig.root_path}/test_case_data/safe_transportation/qyd_baseData.xlsx'
)
@allure.story
(
"单接口用例"
)
@allure.title
(
"{inData[testPoint]}"
)
@allure.description
(
"适用单接口"
)
@pytest.mark.parametrize
(
"inData"
,
get_excelData
(
workBook
,
'基础数据管理'
,
'common'
))
def
test_common
(
self
,
inData
):
# 请求
res
=
request_main
(
url
=
f
"{SafeTransportationConfig().test_bmy_host}{inData['url']}"
,
headers
=
inData
[
'headers'
],
method
=
inData
[
'method'
],
data
=
inData
[
'reqData'
])
allure
.
attach
(
f
"{res}"
,
"响应结果"
,
allure
.
attachment_type
.
TEXT
)
# 断言
assert
res
[
'code'
]
==
inData
[
'expectData'
][
'code'
]
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_baseData.py'
,
'-s'
,
'--alluredir'
,
'../../../report/tmp'
])
# 启动默认浏览器打开报告
os
.
system
(
'allure serve ../../../report/tmp'
)
\ No newline at end of file
test_case_data/safe_transportation/qyd_baseData.xlsx
0 → 100644
View file @
4ecdccf2
File added
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