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
8c2677bb
Commit
8c2677bb
authored
4 years ago
by
zhaihuitao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
d39bd5d5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
19 deletions
+29
-19
workspace.xml
.idea/workspace.xml
+0
-0
result.html
report/result.html
+17
-17
run_all_cases.py
testcase/run_all_cases.py
+12
-2
No files found.
.idea/workspace.xml
View file @
8c2677bb
This diff is collapsed.
Click to expand it.
report/result.html
View file @
8c2677bb
...
@@ -123,8 +123,8 @@ function html_escape(s) {
...
@@ -123,8 +123,8 @@ function html_escape(s) {
<div
class=
'heading'
>
<div
class=
'heading'
>
<h1
style=
"font-family: Microsoft YaHei"
>
<
TKIO接口监控报告
>
</h1>
<h1
style=
"font-family: Microsoft YaHei"
>
<
TKIO接口监控报告
>
</h1>
<p
class=
'attribute'
><strong>
测试人员 :
</strong>
翟会涛
</p>
<p
class=
'attribute'
><strong>
测试人员 :
</strong>
翟会涛
</p>
<p
class=
'attribute'
><strong>
开始时间 :
</strong>
2020-11-09 1
1:07:36
</p>
<p
class=
'attribute'
><strong>
开始时间 :
</strong>
2020-11-09 1
4:22:13
</p>
<p
class=
'attribute'
><strong>
合计耗时 :
</strong>
0:00:0
5.010026
</p>
<p
class=
'attribute'
><strong>
合计耗时 :
</strong>
0:00:0
3.505581
</p>
<p
class=
'attribute'
><strong>
测试结果 :
</strong>
共 14,通过 14,通过率= 100.00%
</p>
<p
class=
'attribute'
><strong>
测试结果 :
</strong>
共 14,通过 14,通过率= 100.00%
</p>
<p
class=
'description'
>
TKIO接口自动化测试用例
</p>
<p
class=
'description'
>
TKIO接口自动化测试用例
</p>
...
@@ -157,7 +157,7 @@ function html_escape(s) {
...
@@ -157,7 +157,7 @@ function html_escape(s) {
</tr>
</tr>
<tr
class=
'passClass warning'
>
<tr
class=
'passClass warning'
>
<td>
android_click.test_click.clickTestCase
</td>
<td>
testcase.
android_click.test_click.clickTestCase
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
0
</td>
<td
class=
"text-center"
>
0
</td>
...
@@ -188,7 +188,7 @@ pt1_1: 执行结果:
...
@@ -188,7 +188,7 @@ pt1_1: 执行结果:
</tr>
</tr>
<tr
class=
'passClass warning'
>
<tr
class=
'passClass warning'
>
<td>
android_events.test_adclick.adclickTestCase
</td>
<td>
testcase.
android_events.test_adclick.adclickTestCase
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
0
</td>
<td
class=
"text-center"
>
0
</td>
...
@@ -217,7 +217,7 @@ pt2_1: 广告点击:{"status":0}
...
@@ -217,7 +217,7 @@ pt2_1: 广告点击:{"status":0}
</tr>
</tr>
<tr
class=
'passClass warning'
>
<tr
class=
'passClass warning'
>
<td>
android_events.test_adshow.adshowTestCase
</td>
<td>
testcase.
android_events.test_adshow.adshowTestCase
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
0
</td>
<td
class=
"text-center"
>
0
</td>
...
@@ -247,7 +247,7 @@ pt3_1:
...
@@ -247,7 +247,7 @@ pt3_1:
</tr>
</tr>
<tr
class=
'passClass warning'
>
<tr
class=
'passClass warning'
>
<td>
android_events.test_appduration.appdurationTestCase
</td>
<td>
testcase.
android_events.test_appduration.appdurationTestCase
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
0
</td>
<td
class=
"text-center"
>
0
</td>
...
@@ -276,7 +276,7 @@ pt4_1: App使用时长:{"status":0}
...
@@ -276,7 +276,7 @@ pt4_1: App使用时长:{"status":0}
</tr>
</tr>
<tr
class=
'passClass warning'
>
<tr
class=
'passClass warning'
>
<td>
android_events.test_batchUpload.batchUploadTestCase
</td>
<td>
testcase.
android_events.test_batchUpload.batchUploadTestCase
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
0
</td>
<td
class=
"text-center"
>
0
</td>
...
@@ -305,7 +305,7 @@ pt5_1: 自定义
...
@@ -305,7 +305,7 @@ pt5_1: 自定义
</tr>
</tr>
<tr
class=
'passClass warning'
>
<tr
class=
'passClass warning'
>
<td>
android_events.test_custom.customTestCase
</td>
<td>
testcase.
android_events.test_custom.customTestCase
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
0
</td>
<td
class=
"text-center"
>
0
</td>
...
@@ -334,7 +334,7 @@ pt6_1: 自定义{"status":0}
...
@@ -334,7 +334,7 @@ pt6_1: 自定义{"status":0}
</tr>
</tr>
<tr
class=
'passClass warning'
>
<tr
class=
'passClass warning'
>
<td>
android_events.test_gettime.gettimeTestCase
</td>
<td>
testcase.
android_events.test_gettime.gettimeTestCase
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
0
</td>
<td
class=
"text-center"
>
0
</td>
...
@@ -354,7 +354,7 @@ pt6_1: 自定义{"status":0}
...
@@ -354,7 +354,7 @@ pt6_1: 自定义{"status":0}
<div
id=
'div_pt7_1'
class=
"collapse in"
>
<div
id=
'div_pt7_1'
class=
"collapse in"
>
<pre>
<pre>
pt7_1: {"ts":1604
891259987
,"status":0}
pt7_1: {"ts":1604
902935788
,"status":0}
</pre>
</pre>
...
@@ -363,7 +363,7 @@ pt7_1: {"ts":1604891259987,"status":0}
...
@@ -363,7 +363,7 @@ pt7_1: {"ts":1604891259987,"status":0}
</tr>
</tr>
<tr
class=
'passClass warning'
>
<tr
class=
'passClass warning'
>
<td>
android_events.test_install.installTestCase
</td>
<td>
testcase.
android_events.test_install.installTestCase
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
0
</td>
<td
class=
"text-center"
>
0
</td>
...
@@ -393,7 +393,7 @@ pt8_1:
...
@@ -393,7 +393,7 @@ pt8_1:
</tr>
</tr>
<tr
class=
'passClass warning'
>
<tr
class=
'passClass warning'
>
<td>
android_events.test_login.loninTestCase
</td>
<td>
testcase.
android_events.test_login.loninTestCase
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
0
</td>
<td
class=
"text-center"
>
0
</td>
...
@@ -422,7 +422,7 @@ pt9_1: 登录{"status":0}
...
@@ -422,7 +422,7 @@ pt9_1: 登录{"status":0}
</tr>
</tr>
<tr
class=
'passClass warning'
>
<tr
class=
'passClass warning'
>
<td>
android_events.test_pageduration.pagedurationTestCase
</td>
<td>
testcase.
android_events.test_pageduration.pagedurationTestCase
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
0
</td>
<td
class=
"text-center"
>
0
</td>
...
@@ -451,7 +451,7 @@ pt10_1: App页面浏览时长分布:{"status":0}
...
@@ -451,7 +451,7 @@ pt10_1: App页面浏览时长分布:{"status":0}
</tr>
</tr>
<tr
class=
'passClass warning'
>
<tr
class=
'passClass warning'
>
<td>
android_events.test_payment.payTestCase
</td>
<td>
testcase.
android_events.test_payment.payTestCase
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
0
</td>
<td
class=
"text-center"
>
0
</td>
...
@@ -480,7 +480,7 @@ pt11_1: 付费{"status":0}
...
@@ -480,7 +480,7 @@ pt11_1: 付费{"status":0}
</tr>
</tr>
<tr
class=
'passClass warning'
>
<tr
class=
'passClass warning'
>
<td>
android_events.test_payorder.payorderTestCase
</td>
<td>
testcase.
android_events.test_payorder.payorderTestCase
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
0
</td>
<td
class=
"text-center"
>
0
</td>
...
@@ -509,7 +509,7 @@ pt12_1: 订单{"status":0}
...
@@ -509,7 +509,7 @@ pt12_1: 订单{"status":0}
</tr>
</tr>
<tr
class=
'passClass warning'
>
<tr
class=
'passClass warning'
>
<td>
android_events.test_register.registerTestCase
</td>
<td>
testcase.
android_events.test_register.registerTestCase
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
0
</td>
<td
class=
"text-center"
>
0
</td>
...
@@ -538,7 +538,7 @@ pt13_1: 注册{"status":0}
...
@@ -538,7 +538,7 @@ pt13_1: 注册{"status":0}
</tr>
</tr>
<tr
class=
'passClass warning'
>
<tr
class=
'passClass warning'
>
<td>
android_events.test_startup.startupTestCase
</td>
<td>
testcase.
android_events.test_startup.startupTestCase
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
1
</td>
<td
class=
"text-center"
>
0
</td>
<td
class=
"text-center"
>
0
</td>
...
...
This diff is collapsed.
Click to expand it.
testcase/run_all_cases.py
View file @
8c2677bb
...
@@ -8,13 +8,21 @@
...
@@ -8,13 +8,21 @@
import
unittest
import
unittest
import
os
import
os
import
HTMLTestR
unner
import
HTMLTestR
eportCN
import
sys
import
sys
import
importlib
importlib
.
reload
(
sys
)
"""解决在Jenkins控制台无法打印中文的问题"""
os
.
environ
[
'NLS_LANG'
]
=
'Simplified Chinese_CHINA.ZHS16GBK'
"""解决在命令行下找不到module的问题"""
curPath
=
os
.
path
.
abspath
(
os
.
path
.
dirname
(
__file__
))
curPath
=
os
.
path
.
abspath
(
os
.
path
.
dirname
(
__file__
))
rootPath
=
os
.
path
.
split
(
curPath
)[
0
]
rootPath
=
os
.
path
.
split
(
curPath
)[
0
]
sys
.
path
.
append
(
rootPath
)
sys
.
path
.
append
(
rootPath
)
"""添加用例地址"""
case_path
=
os
.
path
.
join
(
os
.
getcwd
())
case_path
=
os
.
path
.
join
(
os
.
getcwd
())
report_path
=
r"/Users/zhaihuitao/PycharmProjects/TKIO/interfaceTest/report/result.html"
report_path
=
r"/Users/zhaihuitao/PycharmProjects/TKIO/interfaceTest/report/result.html"
...
@@ -26,13 +34,15 @@ def all_case():
...
@@ -26,13 +34,15 @@ def all_case():
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
fp
=
open
(
report_path
,
'wb'
)
fp
=
open
(
report_path
,
'wb'
)
runner
=
HTMLTestR
unner
.
HTMLTestRunner
(
runner
=
HTMLTestR
eportCN
.
HTMLTestRunner
(
stream
=
fp
,
stream
=
fp
,
title
=
'<TKIO接口监控报告>'
,
title
=
'<TKIO接口监控报告>'
,
description
=
u'TKIO接口自动化测试用例'
,
description
=
u'TKIO接口自动化测试用例'
,
tester
=
u"翟会涛"
tester
=
u"翟会涛"
)
)
runner
.
run
(
all_case
())
runner
.
run
(
all_case
())
"""在控制台打印日志"""
unittest
.
TextTestRunner
(
verbosity
=
2
)
.
run
(
all_case
())
fp
.
close
()
fp
.
close
()
...
...
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