Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
interfaceTest
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Schedules
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
zhaihuitao
interfaceTest
Commits
d87065de
Commit
d87065de
authored
5 years ago
by
zhaihuitao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
a7ba3814
master
…
dev2021
No related merge requests found
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
5 deletions
+53
-5
workspace.xml
.idea/workspace.xml
+0
-0
__init__.py
report/__init__.py
+8
-0
result.html
report/result.html
+0
-0
run_all_cases.py
testcase/run_all_cases.py
+45
-5
No files found.
.idea/workspace.xml
View file @
d87065de
This diff is collapsed.
Click to expand it.
report/__init__.py
0 → 100644
View file @
d87065de
# -*- coding: utf-8 -*-
"""
@author:zhaiht
@file: __init__.py.py
@time: 2020/11/2 11:25
@desc:
"""
\ No newline at end of file
This diff is collapsed.
Click to expand it.
report/result.html
0 → 100644
View file @
d87065de
This diff is collapsed.
Click to expand it.
testcase/run_all_cases.py
View file @
d87065de
...
...
@@ -7,15 +7,54 @@
"""
import
unittest
import
os
,
sys
import
os
import
HTMLTestReportCN
curPath
=
os
.
path
.
abspath
(
os
.
path
.
dirname
(
__file__
))
rootPath
=
os
.
path
.
split
(
curPath
)[
0
]
sys
.
path
.
append
(
rootPath
)
if
__name__
==
'__main__'
:
case_path
=
os
.
path
.
join
(
os
.
getcwd
())
report_path
=
r"/Users/zhaihuitao/PycharmProjects/TKIO/interfaceTest/report/result.html"
def
all_case
():
discover
=
unittest
.
defaultTestLoader
.
discover
(
case_path
,
"test*.py"
)
print
(
discover
)
return
discover
if
__name__
==
"__main__"
:
fp
=
open
(
report_path
,
'wb'
)
runner
=
HTMLTestReportCN
.
HTMLTestRunner
(
stream
=
fp
,
title
=
'<TKIO接口监控报告>'
,
description
=
u'TKIO接口自动化测试用例'
,
tester
=
u"翟会涛"
)
runner
.
run
(
all_case
())
fp
.
close
()
'''if __name__ == "__main__":
case_path = os.path.join(os.getcwd(), "testcase")
report_path = r"/Users/zhaihuitao/PycharmProjects/TKIO/interfaceTest/report/result.html"
curPath = os.path.abspath(os.path.dirname(__file__))
rootPath = os.path.split(curPath)[0]
sys.path.append(rootPath)
base_path = os.path.dirname(os.path.abspath(__file__))
testdir = os.path.join(base_path, 'android_events')
def all_case():
discover = unittest.defaultTestLoader.discover(testdir, 'test*.py')
runner = unittest.TextTestRunner(verbosity=2)
runner.run(discover)
fp = open(report_path, 'wb')
runner = HTMLTestRunnerCN.HTMLTestRunner(
stream=fp,
verbosity=1,
title='<订单自动化测试报告>',
description=u'订单P0接口自动化测试用例',
# tester=u"tester"
)
runner.run(all_case())'''
# fp.close()
\ No newline at end of file
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