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
999c4848
Commit
999c4848
authored
May 13, 2021
by
taoke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改excle
parent
3b8783f7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
11 deletions
+10
-11
config.py
+1
-1
test_case/bmy/test_login.py
+1
-1
test_case/bmy/test_riskMonitar.py
+8
-9
test_case_data/bmc/bmc_testcase01_20210513.xlsx
+0
-0
No files found.
config.py
View file @
999c4848
...
@@ -6,7 +6,7 @@ class BaseConfig():
...
@@ -6,7 +6,7 @@ class BaseConfig():
# 请求头
# 请求头
headers
=
{
'Content-Type'
:
'application/json'
}
headers
=
{
'Content-Type'
:
'application/json'
}
# 当前运行的产品名 #auto
# 当前运行的产品名 #auto
current_name
=
"
bmc
"
current_name
=
"
auto
"
test_case_dir
=
"test_case/"
test_case_dir
=
"test_case/"
secs
=
0.1
# 测试用例间隔运行时间
secs
=
0.1
# 测试用例间隔运行时间
...
...
test_case/bmy/test_login.py
View file @
999c4848
...
@@ -10,7 +10,7 @@ from common.tools import request_main
...
@@ -10,7 +10,7 @@ from common.tools import request_main
from
config
import
BmyConfig
from
config
import
BmyConfig
@allure.epic
(
"
营运车企业端
"
)
@allure.epic
(
"
登录模块
"
)
@allure.feature
(
"登录模块"
)
@allure.feature
(
"登录模块"
)
class
TestLogin
():
class
TestLogin
():
workBook
=
xlrd
.
open_workbook
(
f
'{BmyConfig.root_path}/test_case_data/bmy/bmy_case.xlsx'
)
workBook
=
xlrd
.
open_workbook
(
f
'{BmyConfig.root_path}/test_case_data/bmy/bmy_case.xlsx'
)
...
...
test_case/bmy/test_riskMonitar.py
View file @
999c4848
...
@@ -9,7 +9,7 @@ from service.login import BMY
...
@@ -9,7 +9,7 @@ from service.login import BMY
from
common.tools
import
request_main
from
common.tools
import
request_main
from
config
import
BmyConfig
from
config
import
BmyConfig
from
service.login
import
BMY
from
service.login
import
BMY
@allure.epic
(
"
营运车企业端
"
)
@allure.epic
(
"
信用权益
"
)
@allure.feature
(
"风控台"
)
@allure.feature
(
"风控台"
)
class
TestMonitor
():
class
TestMonitor
():
workBook
=
xlrd
.
open_workbook
(
f
'{BmyConfig.root_path}/test_case_data/bmy/bmy_case.xlsx'
)
workBook
=
xlrd
.
open_workbook
(
f
'{BmyConfig.root_path}/test_case_data/bmy/bmy_case.xlsx'
)
...
@@ -37,11 +37,10 @@ class TestMonitor():
...
@@ -37,11 +37,10 @@ class TestMonitor():
def
teardown_class
(
self
):
def
teardown_class
(
self
):
"""清除"""
"""清除"""
if
__name__
==
'__main__'
:
# if __name__ == '__main__':
for
one
in
os
.
listdir
(
'../../report/tmp'
):
# 列出对应文件夹的数据
# for one in os.listdir('../../report/tmp'): # 列出对应文件夹的数据
if
'json'
in
one
:
# if 'json' in one:
os
.
remove
(
f
'../../report/tmp/{one}'
)
# os.remove(f'../../report/tmp/{one}')
pytest
.
main
([
'test_riskMonitar.py'
,
'-s'
,
'--alluredir'
,
'../../report/tmp'
])
# pytest.main(['test_riskMonitar.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 @
999c4848
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