Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
A
auto-test
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
yuan.luo
auto-test
提交
00eabdac
提交
00eabdac
编写于
6月 20, 2019
作者:
zhangping
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
readme
上级
48367125
变更
10
显示空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
617 行增加
和
25 行删除
+617
-25
.gitignore
.gitignore
+2
-1
Login.cpython-36.pyc
functions/__pycache__/Login.cpython-36.pyc
+0
-0
login.py
functions/login.py
+2
-3
Root.py
main/Root.py
+4
-21
mainLogin.png
mainLogin.png
+0
-0
2019-06-20-09-45-44-result.html
reports/2019-06-20-09-45-44-result.html
+190
-0
2019-06-20-09-52-20-result.html
reports/2019-06-20-09-52-20-result.html
+190
-0
2019-06-20-09-58-59-result.html
reports/2019-06-20-09-58-59-result.html
+205
-0
Tools.py
util/Tools.py
+7
-0
config.py
util/config.py
+17
-0
未找到文件。
.gitignore
浏览文件 @
00eabdac
.idea/
.idea/
*/__pycache__/*
\ No newline at end of file
functions/__pycache__/Login.cpython-36.pyc
已删除
100644 → 0
浏览文件 @
48367125
文件已删除
functions/
L
ogin.py
→
functions/
l
ogin.py
浏览文件 @
00eabdac
...
@@ -2,14 +2,13 @@ import time
...
@@ -2,14 +2,13 @@ import time
import
unittest
import
unittest
import
os
import
os
from
main
import
Root
from
appium
import
webdriver
from
appium
import
webdriver
class
Login
(
unittest
.
TestCase
):
class
Login
(
unittest
.
TestCase
):
def
setUp
(
self
):
def
setUp
(
self
):
self
.
driver
=
webdriver
.
Remote
(
Root
.
host
,
Root
.
caps
)
#
self.driver = webdriver.Remote(Root.host, Root.caps)
pass
def
tearDown
(
self
):
def
tearDown
(
self
):
pass
pass
...
...
main/Root.py
浏览文件 @
00eabdac
import
unittest
import
unittest
import
time
import
time
import
HTMLTestRunner
import
HTMLTestRunner
from
functions
import
Login
from
functions.login
import
Login
from
util.Tools
import
set_file_path
host
=
"http://localhost:4723/wd/hub"
capsLuo
=
{}
capsLuo
[
"platformName"
]
=
"Android"
capsLuo
[
"platformVersion"
]
=
"8.0.0"
capsLuo
[
"deviceName"
]
=
"SM-G9550"
capsLuo
[
"appPackage"
]
=
"com.picahealth.yunque"
capsLuo
[
"appActivity"
]
=
".activitys.mainpage.InitWelcomeActivityVideo"
capsPing
=
{}
capsPing
[
"platformName"
]
=
"Android"
capsPing
[
"platformVersion"
]
=
"8.1.0"
capsPing
[
"deviceName"
]
=
"PACM00"
capsPing
[
"appPackage"
]
=
"com.picahealth.yunque"
capsPing
[
"appActivity"
]
=
".activitys.mainpage.InitWelcomeActivityVideo"
caps
=
capsLuo
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
suite
=
unittest
.
TestSuite
()
suite
=
unittest
.
TestSuite
()
suite
.
addTest
(
Login
.
Login
(
"test_login"
))
suite
.
addTest
(
Login
(
"test_login"
))
filename
=
"/Users/cross/Downloads/"
+
time
.
strftime
(
"
%
Y-
%
m-
%
d-
%
H-
%
M-
%
S"
,
time
.
gmtime
())
+
'-result.html'
filename
=
set_file_path
(
'reports/'
)
+
time
.
strftime
(
"
%
Y-
%
m-
%
d-
%
H-
%
M-
%
S"
,
time
.
gmtime
())
+
'-result.html'
fp
=
open
(
filename
,
'wb'
)
fp
=
open
(
filename
,
'wb'
)
runner
=
HTMLTestRunner
.
HTMLTestRunner
(
stream
=
fp
,
title
=
'测试报告'
,
description
=
'用例执行情况:'
)
runner
=
HTMLTestRunner
.
HTMLTestRunner
(
stream
=
fp
,
title
=
'测试报告'
,
description
=
'用例执行情况:'
)
runner
.
run
(
suite
)
runner
.
run
(
suite
)
...
...
mainLogin.png
0 → 100644
浏览文件 @
00eabdac
100.3 KB
reports/2019-06-20-09-45-44-result.html
0 → 100644
浏览文件 @
00eabdac
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns=
"http://www.w3.org/1999/xhtml"
>
<head>
<title>
测试报告
</title>
<meta
name=
"generator"
content=
"HTMLTestRunner 0.8.2.2"
/>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
/>
<link
href=
"http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.min.css"
rel=
"stylesheet"
>
<script
src=
"http://libs.baidu.com/jquery/2.0.0/jquery.min.js"
></script>
<script
src=
"http://libs.baidu.com/bootstrap/3.0.3/js/bootstrap.min.js"
></script>
<style
type=
"text/css"
media=
"screen"
>
body
{
font-family
:
Microsoft
YaHei
,
Tahoma
,
arial
,
helvetica
,
sans-serif
;
padding
:
20px
;
font-size
:
80%
;
}
table
{
font-size
:
100%
;
}
/* -- heading ---------------------------------------------------------------------- */
.heading
{
margin-top
:
0ex
;
margin-bottom
:
1ex
;
}
.heading
.description
{
margin-top
:
4ex
;
margin-bottom
:
6ex
;
}
/* -- report ------------------------------------------------------------------------ */
#total_row
{
font-weight
:
bold
;
}
.passCase
{
color
:
#5cb85c
;
}
.failCase
{
color
:
#d9534f
;
font-weight
:
bold
;
}
.errorCase
{
color
:
#f0ad4e
;
font-weight
:
bold
;
}
.hiddenRow
{
display
:
none
;
}
.testcase
{
margin-left
:
2em
;
}
</style>
</head>
<body
>
<script
language=
"javascript"
type=
"text/javascript"
>
output_list
=
Array
();
/*level 调整增加只显示通过用例的分类 --Findyou
0:Summary //all hiddenRow
1:Failed //pt hiddenRow, ft none
2:Pass //pt none, ft hiddenRow
3:All //pt none, ft none
*/
function
showCase
(
level
)
{
trs
=
document
.
getElementsByTagName
(
"tr"
);
for
(
var
i
=
0
;
i
<
trs
.
length
;
i
++
)
{
tr
=
trs
[
i
];
id
=
tr
.
id
;
if
(
id
.
substr
(
0
,
2
)
==
'ft'
)
{
if
(
level
==
2
||
level
==
0
)
{
tr
.
className
=
'hiddenRow'
;
}
else
{
tr
.
className
=
''
;
}
}
if
(
id
.
substr
(
0
,
2
)
==
'pt'
)
{
if
(
level
<
2
)
{
tr
.
className
=
'hiddenRow'
;
}
else
{
tr
.
className
=
''
;
}
}
}
//加入【详细】切换文字变化 --Findyou
detail_class
=
document
.
getElementsByClassName
(
'detail'
);
//console.log(detail_class.length)
if
(
level
==
3
)
{
for
(
var
i
=
0
;
i
<
detail_class
.
length
;
i
++
){
detail_class
[
i
].
innerHTML
=
"收起"
}
}
else
{
for
(
var
i
=
0
;
i
<
detail_class
.
length
;
i
++
){
detail_class
[
i
].
innerHTML
=
"详细"
}
}
}
function
showClassDetail
(
cid
,
count
)
{
var
id_list
=
Array
(
count
);
var
toHide
=
1
;
for
(
var
i
=
0
;
i
<
count
;
i
++
)
{
//ID修改 点 为 下划线 -Findyou
tid0
=
't'
+
cid
.
substr
(
1
)
+
'_'
+
(
i
+
1
);
tid
=
'f'
+
tid0
;
tr
=
document
.
getElementById
(
tid
);
if
(
!
tr
)
{
tid
=
'p'
+
tid0
;
tr
=
document
.
getElementById
(
tid
);
}
id_list
[
i
]
=
tid
;
if
(
tr
.
className
)
{
toHide
=
0
;
}
}
for
(
var
i
=
0
;
i
<
count
;
i
++
)
{
tid
=
id_list
[
i
];
//修改点击无法收起的BUG,加入【详细】切换文字变化 --Findyou
if
(
toHide
)
{
document
.
getElementById
(
tid
).
className
=
'hiddenRow'
;
document
.
getElementById
(
cid
).
innerText
=
"详细"
}
else
{
document
.
getElementById
(
tid
).
className
=
''
;
document
.
getElementById
(
cid
).
innerText
=
"收起"
}
}
}
function
html_escape
(
s
)
{
s
=
s
.
replace
(
/&/g
,
'&'
);
s
=
s
.
replace
(
/</g
,
'<'
);
s
=
s
.
replace
(
/>/g
,
'>'
);
return
s
;
}
</script>
<div
class=
'heading'
>
<h1
style=
"font-family: Microsoft YaHei"
>
测试报告
</h1>
<p
class=
'attribute'
><strong>
测试人员 :
</strong>
最棒QA
</p>
<p
class=
'attribute'
><strong>
开始时间 :
</strong>
2019-06-20 17:45:44
</p>
<p
class=
'attribute'
><strong>
合计耗时 :
</strong>
0:00:32.653059
</p>
<p
class=
'attribute'
><strong>
测试结果 :
</strong>
共 1,通过 1,通过率= 100.00%
</p>
<p
class=
'description'
>
用例执行情况:
</p>
</div>
<p
id=
'show_detail_line'
>
<a
class=
"btn btn-primary"
href=
'javascript:showCase(0)'
>
概要{ 100.00% }
</a>
<a
class=
"btn btn-danger"
href=
'javascript:showCase(1)'
>
失败{ 0 }
</a>
<a
class=
"btn btn-success"
href=
'javascript:showCase(2)'
>
通过{ 1 }
</a>
<a
class=
"btn btn-info"
href=
'javascript:showCase(3)'
>
所有{ 1 }
</a>
</p>
<table
id=
'result_table'
class=
"table table-condensed table-bordered table-hover"
>
<colgroup>
<col
align=
'left'
/>
<col
align=
'right'
/>
<col
align=
'right'
/>
<col
align=
'right'
/>
<col
align=
'right'
/>
<col
align=
'right'
/>
</colgroup>
<tr
id=
'header_row'
class=
"text-center success"
style=
"font-weight: bold;font-size: 14px;"
>
<td>
用例集/测试用例
</td>
<td>
总计
</td>
<td>
通过
</td>
<td>
失败
</td>
<td>
错误
</td>
<td>
详细
</td>
</tr>
<tr
class=
'passClass warning'
>
<td>
functions.Login.Login
</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>
<td
class=
"text-center"
><a
href=
"javascript:showClassDetail('c1',1)"
class=
"detail"
id=
'c1'
>
详细
</a></td>
</tr>
<tr
id=
'pt1_1'
class=
'hiddenRow'
>
<td
class=
'passCase'
><div
class=
'testcase'
>
test_login
</div></td>
<td
colspan=
'5'
align=
'center'
><span
class=
"label label-success success"
>
通过
</span></td>
</tr>
<tr
id=
'total_row'
class=
"text-center active"
>
<td>
总计
</td>
<td>
1
</td>
<td>
1
</td>
<td>
0
</td>
<td>
0
</td>
<td>
通过率:100.00%
</td>
</tr>
</table>
<div
id=
'ending'
>
</div>
<div
style=
" position:fixed;right:50px; bottom:30px; width:20px; height:20px;cursor:pointer"
>
<a
href=
"#"
><span
class=
"glyphicon glyphicon-eject"
style =
"font-size:30px;"
aria-hidden=
"true"
>
</span></a></div>
</body>
</html>
reports/2019-06-20-09-52-20-result.html
0 → 100644
浏览文件 @
00eabdac
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns=
"http://www.w3.org/1999/xhtml"
>
<head>
<title>
测试报告
</title>
<meta
name=
"generator"
content=
"HTMLTestRunner 0.8.2.2"
/>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
/>
<link
href=
"http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.min.css"
rel=
"stylesheet"
>
<script
src=
"http://libs.baidu.com/jquery/2.0.0/jquery.min.js"
></script>
<script
src=
"http://libs.baidu.com/bootstrap/3.0.3/js/bootstrap.min.js"
></script>
<style
type=
"text/css"
media=
"screen"
>
body
{
font-family
:
Microsoft
YaHei
,
Tahoma
,
arial
,
helvetica
,
sans-serif
;
padding
:
20px
;
font-size
:
80%
;
}
table
{
font-size
:
100%
;
}
/* -- heading ---------------------------------------------------------------------- */
.heading
{
margin-top
:
0ex
;
margin-bottom
:
1ex
;
}
.heading
.description
{
margin-top
:
4ex
;
margin-bottom
:
6ex
;
}
/* -- report ------------------------------------------------------------------------ */
#total_row
{
font-weight
:
bold
;
}
.passCase
{
color
:
#5cb85c
;
}
.failCase
{
color
:
#d9534f
;
font-weight
:
bold
;
}
.errorCase
{
color
:
#f0ad4e
;
font-weight
:
bold
;
}
.hiddenRow
{
display
:
none
;
}
.testcase
{
margin-left
:
2em
;
}
</style>
</head>
<body
>
<script
language=
"javascript"
type=
"text/javascript"
>
output_list
=
Array
();
/*level 调整增加只显示通过用例的分类 --Findyou
0:Summary //all hiddenRow
1:Failed //pt hiddenRow, ft none
2:Pass //pt none, ft hiddenRow
3:All //pt none, ft none
*/
function
showCase
(
level
)
{
trs
=
document
.
getElementsByTagName
(
"tr"
);
for
(
var
i
=
0
;
i
<
trs
.
length
;
i
++
)
{
tr
=
trs
[
i
];
id
=
tr
.
id
;
if
(
id
.
substr
(
0
,
2
)
==
'ft'
)
{
if
(
level
==
2
||
level
==
0
)
{
tr
.
className
=
'hiddenRow'
;
}
else
{
tr
.
className
=
''
;
}
}
if
(
id
.
substr
(
0
,
2
)
==
'pt'
)
{
if
(
level
<
2
)
{
tr
.
className
=
'hiddenRow'
;
}
else
{
tr
.
className
=
''
;
}
}
}
//加入【详细】切换文字变化 --Findyou
detail_class
=
document
.
getElementsByClassName
(
'detail'
);
//console.log(detail_class.length)
if
(
level
==
3
)
{
for
(
var
i
=
0
;
i
<
detail_class
.
length
;
i
++
){
detail_class
[
i
].
innerHTML
=
"收起"
}
}
else
{
for
(
var
i
=
0
;
i
<
detail_class
.
length
;
i
++
){
detail_class
[
i
].
innerHTML
=
"详细"
}
}
}
function
showClassDetail
(
cid
,
count
)
{
var
id_list
=
Array
(
count
);
var
toHide
=
1
;
for
(
var
i
=
0
;
i
<
count
;
i
++
)
{
//ID修改 点 为 下划线 -Findyou
tid0
=
't'
+
cid
.
substr
(
1
)
+
'_'
+
(
i
+
1
);
tid
=
'f'
+
tid0
;
tr
=
document
.
getElementById
(
tid
);
if
(
!
tr
)
{
tid
=
'p'
+
tid0
;
tr
=
document
.
getElementById
(
tid
);
}
id_list
[
i
]
=
tid
;
if
(
tr
.
className
)
{
toHide
=
0
;
}
}
for
(
var
i
=
0
;
i
<
count
;
i
++
)
{
tid
=
id_list
[
i
];
//修改点击无法收起的BUG,加入【详细】切换文字变化 --Findyou
if
(
toHide
)
{
document
.
getElementById
(
tid
).
className
=
'hiddenRow'
;
document
.
getElementById
(
cid
).
innerText
=
"详细"
}
else
{
document
.
getElementById
(
tid
).
className
=
''
;
document
.
getElementById
(
cid
).
innerText
=
"收起"
}
}
}
function
html_escape
(
s
)
{
s
=
s
.
replace
(
/&/g
,
'&'
);
s
=
s
.
replace
(
/</g
,
'<'
);
s
=
s
.
replace
(
/>/g
,
'>'
);
return
s
;
}
</script>
<div
class=
'heading'
>
<h1
style=
"font-family: Microsoft YaHei"
>
测试报告
</h1>
<p
class=
'attribute'
><strong>
测试人员 :
</strong>
最棒QA
</p>
<p
class=
'attribute'
><strong>
开始时间 :
</strong>
2019-06-20 17:52:20
</p>
<p
class=
'attribute'
><strong>
合计耗时 :
</strong>
0:00:31.837120
</p>
<p
class=
'attribute'
><strong>
测试结果 :
</strong>
共 1,通过 1,通过率= 100.00%
</p>
<p
class=
'description'
>
用例执行情况:
</p>
</div>
<p
id=
'show_detail_line'
>
<a
class=
"btn btn-primary"
href=
'javascript:showCase(0)'
>
概要{ 100.00% }
</a>
<a
class=
"btn btn-danger"
href=
'javascript:showCase(1)'
>
失败{ 0 }
</a>
<a
class=
"btn btn-success"
href=
'javascript:showCase(2)'
>
通过{ 1 }
</a>
<a
class=
"btn btn-info"
href=
'javascript:showCase(3)'
>
所有{ 1 }
</a>
</p>
<table
id=
'result_table'
class=
"table table-condensed table-bordered table-hover"
>
<colgroup>
<col
align=
'left'
/>
<col
align=
'right'
/>
<col
align=
'right'
/>
<col
align=
'right'
/>
<col
align=
'right'
/>
<col
align=
'right'
/>
</colgroup>
<tr
id=
'header_row'
class=
"text-center success"
style=
"font-weight: bold;font-size: 14px;"
>
<td>
用例集/测试用例
</td>
<td>
总计
</td>
<td>
通过
</td>
<td>
失败
</td>
<td>
错误
</td>
<td>
详细
</td>
</tr>
<tr
class=
'passClass warning'
>
<td>
functions.Login.Login
</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>
<td
class=
"text-center"
><a
href=
"javascript:showClassDetail('c1',1)"
class=
"detail"
id=
'c1'
>
详细
</a></td>
</tr>
<tr
id=
'pt1_1'
class=
'hiddenRow'
>
<td
class=
'passCase'
><div
class=
'testcase'
>
test_login
</div></td>
<td
colspan=
'5'
align=
'center'
><span
class=
"label label-success success"
>
通过
</span></td>
</tr>
<tr
id=
'total_row'
class=
"text-center active"
>
<td>
总计
</td>
<td>
1
</td>
<td>
1
</td>
<td>
0
</td>
<td>
0
</td>
<td>
通过率:100.00%
</td>
</tr>
</table>
<div
id=
'ending'
>
</div>
<div
style=
" position:fixed;right:50px; bottom:30px; width:20px; height:20px;cursor:pointer"
>
<a
href=
"#"
><span
class=
"glyphicon glyphicon-eject"
style =
"font-size:30px;"
aria-hidden=
"true"
>
</span></a></div>
</body>
</html>
reports/2019-06-20-09-58-59-result.html
0 → 100644
浏览文件 @
00eabdac
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns=
"http://www.w3.org/1999/xhtml"
>
<head>
<title>
测试报告
</title>
<meta
name=
"generator"
content=
"HTMLTestRunner 0.8.2.2"
/>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
/>
<link
href=
"http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.min.css"
rel=
"stylesheet"
>
<script
src=
"http://libs.baidu.com/jquery/2.0.0/jquery.min.js"
></script>
<script
src=
"http://libs.baidu.com/bootstrap/3.0.3/js/bootstrap.min.js"
></script>
<style
type=
"text/css"
media=
"screen"
>
body
{
font-family
:
Microsoft
YaHei
,
Tahoma
,
arial
,
helvetica
,
sans-serif
;
padding
:
20px
;
font-size
:
80%
;
}
table
{
font-size
:
100%
;
}
/* -- heading ---------------------------------------------------------------------- */
.heading
{
margin-top
:
0ex
;
margin-bottom
:
1ex
;
}
.heading
.description
{
margin-top
:
4ex
;
margin-bottom
:
6ex
;
}
/* -- report ------------------------------------------------------------------------ */
#total_row
{
font-weight
:
bold
;
}
.passCase
{
color
:
#5cb85c
;
}
.failCase
{
color
:
#d9534f
;
font-weight
:
bold
;
}
.errorCase
{
color
:
#f0ad4e
;
font-weight
:
bold
;
}
.hiddenRow
{
display
:
none
;
}
.testcase
{
margin-left
:
2em
;
}
</style>
</head>
<body
>
<script
language=
"javascript"
type=
"text/javascript"
>
output_list
=
Array
();
/*level 调整增加只显示通过用例的分类 --Findyou
0:Summary //all hiddenRow
1:Failed //pt hiddenRow, ft none
2:Pass //pt none, ft hiddenRow
3:All //pt none, ft none
*/
function
showCase
(
level
)
{
trs
=
document
.
getElementsByTagName
(
"tr"
);
for
(
var
i
=
0
;
i
<
trs
.
length
;
i
++
)
{
tr
=
trs
[
i
];
id
=
tr
.
id
;
if
(
id
.
substr
(
0
,
2
)
==
'ft'
)
{
if
(
level
==
2
||
level
==
0
)
{
tr
.
className
=
'hiddenRow'
;
}
else
{
tr
.
className
=
''
;
}
}
if
(
id
.
substr
(
0
,
2
)
==
'pt'
)
{
if
(
level
<
2
)
{
tr
.
className
=
'hiddenRow'
;
}
else
{
tr
.
className
=
''
;
}
}
}
//加入【详细】切换文字变化 --Findyou
detail_class
=
document
.
getElementsByClassName
(
'detail'
);
//console.log(detail_class.length)
if
(
level
==
3
)
{
for
(
var
i
=
0
;
i
<
detail_class
.
length
;
i
++
){
detail_class
[
i
].
innerHTML
=
"收起"
}
}
else
{
for
(
var
i
=
0
;
i
<
detail_class
.
length
;
i
++
){
detail_class
[
i
].
innerHTML
=
"详细"
}
}
}
function
showClassDetail
(
cid
,
count
)
{
var
id_list
=
Array
(
count
);
var
toHide
=
1
;
for
(
var
i
=
0
;
i
<
count
;
i
++
)
{
//ID修改 点 为 下划线 -Findyou
tid0
=
't'
+
cid
.
substr
(
1
)
+
'_'
+
(
i
+
1
);
tid
=
'f'
+
tid0
;
tr
=
document
.
getElementById
(
tid
);
if
(
!
tr
)
{
tid
=
'p'
+
tid0
;
tr
=
document
.
getElementById
(
tid
);
}
id_list
[
i
]
=
tid
;
if
(
tr
.
className
)
{
toHide
=
0
;
}
}
for
(
var
i
=
0
;
i
<
count
;
i
++
)
{
tid
=
id_list
[
i
];
//修改点击无法收起的BUG,加入【详细】切换文字变化 --Findyou
if
(
toHide
)
{
document
.
getElementById
(
tid
).
className
=
'hiddenRow'
;
document
.
getElementById
(
cid
).
innerText
=
"详细"
}
else
{
document
.
getElementById
(
tid
).
className
=
''
;
document
.
getElementById
(
cid
).
innerText
=
"收起"
}
}
}
function
html_escape
(
s
)
{
s
=
s
.
replace
(
/&/g
,
'&'
);
s
=
s
.
replace
(
/</g
,
'<'
);
s
=
s
.
replace
(
/>/g
,
'>'
);
return
s
;
}
</script>
<div
class=
'heading'
>
<h1
style=
"font-family: Microsoft YaHei"
>
测试报告
</h1>
<p
class=
'attribute'
><strong>
测试人员 :
</strong>
最棒QA
</p>
<p
class=
'attribute'
><strong>
开始时间 :
</strong>
2019-06-20 17:58:59
</p>
<p
class=
'attribute'
><strong>
合计耗时 :
</strong>
0:00:02.001351
</p>
<p
class=
'attribute'
><strong>
测试结果 :
</strong>
共 1,通过 1,通过率= 100.00%
</p>
<p
class=
'description'
>
用例执行情况:
</p>
</div>
<p
id=
'show_detail_line'
>
<a
class=
"btn btn-primary"
href=
'javascript:showCase(0)'
>
概要{ 100.00% }
</a>
<a
class=
"btn btn-danger"
href=
'javascript:showCase(1)'
>
失败{ 0 }
</a>
<a
class=
"btn btn-success"
href=
'javascript:showCase(2)'
>
通过{ 1 }
</a>
<a
class=
"btn btn-info"
href=
'javascript:showCase(3)'
>
所有{ 1 }
</a>
</p>
<table
id=
'result_table'
class=
"table table-condensed table-bordered table-hover"
>
<colgroup>
<col
align=
'left'
/>
<col
align=
'right'
/>
<col
align=
'right'
/>
<col
align=
'right'
/>
<col
align=
'right'
/>
<col
align=
'right'
/>
</colgroup>
<tr
id=
'header_row'
class=
"text-center success"
style=
"font-weight: bold;font-size: 14px;"
>
<td>
用例集/测试用例
</td>
<td>
总计
</td>
<td>
通过
</td>
<td>
失败
</td>
<td>
错误
</td>
<td>
详细
</td>
</tr>
<tr
class=
'passClass warning'
>
<td>
functions.login.Login
</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>
<td
class=
"text-center"
><a
href=
"javascript:showClassDetail('c1',1)"
class=
"detail"
id=
'c1'
>
详细
</a></td>
</tr>
<tr
id=
'pt1_1'
class=
'hiddenRow'
>
<td
class=
'passCase'
><div
class=
'testcase'
>
test_login
</div></td>
<td
colspan=
'5'
align=
'center'
>
<!--默认收起错误信息 -Findyou
<button id='btn_pt1_1' type="button" class="btn btn-danger btn-xs collapsed" data-toggle="collapse" data-target='#div_pt1_1'>通过</button>
<div id='div_pt1_1' class="collapse"> -->
<!-- 默认展开错误信息 -Findyou -->
<button
id=
'btn_pt1_1'
type=
"button"
class=
"btn btn-danger btn-xs"
data-toggle=
"collapse"
data-target=
'#div_pt1_1'
>
通过
</button>
<div
id=
'div_pt1_1'
class=
"collapse in"
>
<pre>
pt1_1: 'Login' object has no attribute 'driver'
</pre>
</div>
</td>
</tr>
<tr
id=
'total_row'
class=
"text-center active"
>
<td>
总计
</td>
<td>
1
</td>
<td>
1
</td>
<td>
0
</td>
<td>
0
</td>
<td>
通过率:100.00%
</td>
</tr>
</table>
<div
id=
'ending'
>
</div>
<div
style=
" position:fixed;right:50px; bottom:30px; width:20px; height:20px;cursor:pointer"
>
<a
href=
"#"
><span
class=
"glyphicon glyphicon-eject"
style =
"font-size:30px;"
aria-hidden=
"true"
>
</span></a></div>
</body>
</html>
util/Tools.py
浏览文件 @
00eabdac
...
@@ -18,3 +18,10 @@ def get_validate_code(self):
...
@@ -18,3 +18,10 @@ def get_validate_code(self):
raise
ValueError
raise
ValueError
return
code
return
code
def
get_project_path
():
return
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
'__file__'
),
os
.
path
.
pardir
))
def
set_file_path
(
pathname
):
par_dir
=
get_project_path
()
return
os
.
path
.
join
(
par_dir
,
pathname
)
\ No newline at end of file
util/config.py
0 → 100644
浏览文件 @
00eabdac
host
=
"http://localhost:4723/wd/hub"
capsLuo
=
{}
capsLuo
[
"platformName"
]
=
"Android"
capsLuo
[
"platformVersion"
]
=
"8.0.0"
capsLuo
[
"deviceName"
]
=
"SM-G9550"
capsLuo
[
"appPackage"
]
=
"com.picahealth.yunque"
capsLuo
[
"appActivity"
]
=
".activitys.mainpage.InitWelcomeActivityVideo"
capsPing
=
{}
capsPing
[
"platformName"
]
=
"Android"
capsPing
[
"platformVersion"
]
=
"6.0.1"
capsPing
[
"deviceName"
]
=
"PACM00"
capsPing
[
"appPackage"
]
=
"com.picahealth.yunque"
capsPing
[
"appActivity"
]
=
".activitys.mainpage.InitWelcomeActivityVideo"
caps
=
capsPing
\ No newline at end of file
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录