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
29830d3f
Commit
29830d3f
authored
3 years ago
by
taoke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加用例
parent
9ff42bbe
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
7 deletions
+8
-7
config.py
+4
-3
test_case/bmc/conftest.py
+4
-4
test_case_data/bmc/bmc_testcase01_20210513.xlsx
+0
-0
No files found.
config.py
View file @
29830d3f
...
...
@@ -6,7 +6,7 @@ class BaseConfig():
# 请求头
headers
=
{
'Content-Type'
:
'application/json'
}
# 当前运行的产品名 #auto
current_name
=
"
auto
"
current_name
=
"
bmc
"
test_case_dir
=
"test_case/"
secs
=
0.1
# 测试用例间隔运行时间
...
...
@@ -33,6 +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"
#bmc除登录外所有的header
headers
=
{
'City-Code'
:
"520100"
,
...
...
@@ -46,9 +47,9 @@ class BMCConfig(BaseConfig):
'Net'
:
"wifi"
,
'OS-Type'
:
"Android"
,
'OS-Version'
:
"27"
,
'Pvt-Token'
:
"
"
,
'Pvt-Token'
:
f
"{bmc_pvt_token}
"
,
'Resolution'
:
"2034x1080"
,
'Token'
:
"
"
,
'Token'
:
f
"{bmc_token}
"
,
'Version'
:
"2.2.6"
}
#注册和注销专用账号
...
...
This diff is collapsed.
Click to expand it.
test_case/bmc/conftest.py
View file @
29830d3f
...
...
@@ -14,10 +14,10 @@ def bmc_login_fixture():
indata
=
{
"phone"
:
"17822000000"
,
"encodedGesture"
:
"67e6d10010533eed4bbe9659863bf6ee"
}
res
=
BMC
()
.
bmc_login
(
indata
)
#
setattr(BMCConfig, 'bmc_token', res[0])
#
setattr(BMCConfig, 'bmc_pvt_token', res[1])
BMCConfig
.
headers
[
'Pvt-Token'
]
=
res
[
1
]
BMCConfig
.
headers
[
'Token'
]
=
res
[
0
]
setattr
(
BMCConfig
,
'bmc_token'
,
res
[
0
])
setattr
(
BMCConfig
,
'bmc_pvt_token'
,
res
[
1
])
#
BMCConfig.headers['Pvt-Token'] = res[1]
#
BMCConfig.headers['Token'] = res[0]
if
__name__
==
'__main__'
:
...
...
This diff is collapsed.
Click to expand it.
test_case_data/bmc/bmc_testcase01_20210513.xlsx
View file @
29830d3f
No preview for this file type
This diff is collapsed.
Click to expand it.
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