560 lines
18 KiB
HTML
560 lines
18 KiB
HTML
<?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>抽屉新热榜UI自动化测试报告</title>
|
||
<meta name="generator" content="HTMLTestRunner 0.8.2"/>
|
||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||
|
||
<style type="text/css" media="screen">
|
||
body { font-family: verdana, arial, helvetica, sans-serif; font-size: 80%; }
|
||
table { font-size: 100%; }
|
||
pre { }
|
||
|
||
/* -- heading ---------------------------------------------------------------------- */
|
||
h1 {
|
||
font-size: 16pt;
|
||
color: gray;
|
||
}
|
||
.heading {
|
||
margin-top: 0ex;
|
||
margin-bottom: 1ex;
|
||
}
|
||
|
||
.heading .attribute {
|
||
margin-top: 1ex;
|
||
margin-bottom: 0;
|
||
}
|
||
|
||
.heading .description {
|
||
margin-top: 4ex;
|
||
margin-bottom: 6ex;
|
||
}
|
||
|
||
/* -- css div popup ------------------------------------------------------------------------ */
|
||
a.popup_link {
|
||
}
|
||
|
||
a.popup_link:hover {
|
||
color: red;
|
||
}
|
||
|
||
.img{
|
||
width: 100%;
|
||
height: 100%;
|
||
border-collapse: collapse;
|
||
border: 2px solid #777;
|
||
}
|
||
|
||
.screenshots {
|
||
z-index: 100;
|
||
position:absolute;
|
||
left: 23%;
|
||
top: 20%;
|
||
display: none;
|
||
}
|
||
.close_shots {
|
||
position:absolute;
|
||
top:0; left:98%;
|
||
z-index:99;
|
||
width:20px;
|
||
}
|
||
.popup_window {
|
||
display: none;
|
||
position: relative;
|
||
left: 0px;
|
||
top: 0px;
|
||
/*border: solid #627173 1px; */
|
||
padding: 10px;
|
||
background-color: #E6E6D6;
|
||
font-family: "Lucida Console", "Courier New", Courier, monospace;
|
||
text-align: left;
|
||
font-size: 8pt;
|
||
width: 800px;
|
||
}
|
||
|
||
}
|
||
/* -- report ------------------------------------------------------------------------ */
|
||
#show_detail_line {
|
||
margin-top: 3ex;
|
||
margin-bottom: 1ex;
|
||
}
|
||
#result_table {
|
||
width: 80%;
|
||
border-collapse: collapse;
|
||
border: 1px solid #777;
|
||
}
|
||
#header_row {
|
||
font-weight: bold;
|
||
color: white;
|
||
background-color: #777;
|
||
}
|
||
#result_table td {
|
||
border: 1px solid #777;
|
||
padding: 2px;
|
||
}
|
||
#total_row { font-weight: bold; }
|
||
.passClass { background-color: #6c6; }
|
||
.failClass { background-color: #c60; }
|
||
.errorClass { background-color: #c00; }
|
||
.passCase { color: #6c6; font-weight: bold;}
|
||
.failCase { color: #c60; font-weight: bold; }
|
||
.errorCase { color: #c00; font-weight: bold; }
|
||
.hiddenRow { display: none; }
|
||
.testcase { margin-left: 2em; }
|
||
|
||
|
||
/* -- ending ---------------------------------------------------------------------- */
|
||
#ending {
|
||
}
|
||
.piechart{
|
||
position:absolute; ;
|
||
top:20px;
|
||
left:350px;
|
||
width: 200px;
|
||
float: left;
|
||
display: inline;
|
||
}
|
||
|
||
</style>
|
||
|
||
</head>
|
||
<body>
|
||
<script language="javascript" type="text/javascript"><!--
|
||
output_list = Array();
|
||
|
||
/* 增加显示通过分类列表 --YinJia */
|
||
/* level - 0:Summary; 1:Failed; 2:Pass; 3:All */
|
||
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 = '';
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
|
||
function showClassDetail(cid, count) {
|
||
var id_list = Array(count);
|
||
var toHide = 1;
|
||
for (var i = 0; i < count; i++) {
|
||
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];
|
||
if (toHide) {
|
||
document.getElementById('div_'+tid).style.display = 'none'
|
||
document.getElementById(tid).className = 'hiddenRow';
|
||
}
|
||
else {
|
||
document.getElementById(tid).className = '';
|
||
}
|
||
}
|
||
}
|
||
|
||
|
||
function showTestDetail(div_id){
|
||
var details_div = document.getElementById(div_id)
|
||
var displayState = details_div.style.display
|
||
// alert(displayState)
|
||
if (displayState != 'block' ) {
|
||
displayState = 'block'
|
||
details_div.style.display = 'block'
|
||
}
|
||
else {
|
||
details_div.style.display = 'none'
|
||
}
|
||
}
|
||
|
||
|
||
function html_escape(s) {
|
||
s = s.replace(/&/g,'&');
|
||
s = s.replace(/</g,'<');
|
||
s = s.replace(/>/g,'>');
|
||
return s;
|
||
}
|
||
/* 增加饼图显示 --YinJia */
|
||
function drawCircle(pass, fail, error){
|
||
var color = ["#6c6","#c60","#c00"];
|
||
var data = [pass,fail,error];
|
||
var text_arr = ["pass", "fail", "error"];
|
||
|
||
var canvas = document.getElementById("circle");
|
||
var ctx = canvas.getContext("2d");
|
||
var startPoint=0;
|
||
var width = 20, height = 10;
|
||
var posX = 112 * 2 + 20, posY = 30;
|
||
var textX = posX + width + 5, textY = posY + 10;
|
||
for(var i=0;i<data.length;i++){
|
||
ctx.fillStyle = color[i];
|
||
ctx.beginPath();
|
||
ctx.moveTo(112,84);
|
||
ctx.arc(112,84,84,startPoint,startPoint+Math.PI*2*(data[i]/(data[0]+data[1]+data[2])),false);
|
||
ctx.fill();
|
||
startPoint += Math.PI*2*(data[i]/(data[0]+data[1]+data[2]));
|
||
ctx.fillStyle = color[i];
|
||
ctx.fillRect(posX, posY + 20 * i, width, height);
|
||
ctx.moveTo(posX, posY + 20 * i);
|
||
ctx.font = 'bold 14px';
|
||
ctx.fillStyle = color[i];
|
||
var percent = text_arr[i] + ":"+data[i];
|
||
ctx.fillText(percent, textX, textY + 20 * i);
|
||
|
||
}
|
||
}
|
||
|
||
function show_shots(obj) {
|
||
obj.nextElementSibling.style.display="block";
|
||
|
||
}
|
||
|
||
function close_shots(obj) {
|
||
obj.parentElement.style.display="none";
|
||
}
|
||
|
||
|
||
|
||
/* obsoleted by detail in <div>
|
||
function showOutput(id, name) {
|
||
var w = window.open("", //url
|
||
name,
|
||
"resizable,scrollbars,status,width=800,height=450");
|
||
d = w.document;
|
||
d.write("<pre>");
|
||
d.write(html_escape(output_list[id]));
|
||
d.write("\n");
|
||
d.write("<a href='javascript:window.close()'>close</a>\n");
|
||
d.write("</pre>\n");
|
||
d.close();
|
||
}
|
||
*/
|
||
--></script>
|
||
<div class="piechart">
|
||
<div>
|
||
<canvas id="circle" width="350" height="168" </canvas>
|
||
</div>
|
||
</div>
|
||
<div class='heading'>
|
||
<h1>抽屉新热榜UI自动化测试报告</h1>
|
||
<p class='attribute'><strong>测试人员:</strong> Jason</p>
|
||
<p class='attribute'><strong>开始时间:</strong> 2019-01-28 01:20:25</p>
|
||
<p class='attribute'><strong>合计耗时:</strong> 0:01:34.536723</p>
|
||
<p class='attribute'><strong>测试结果:</strong> 总共 8 通过 8 通过率 = 100.00%</p>
|
||
|
||
<p class='description'>环境:windows 7 浏览器:chrome</p>
|
||
</div>
|
||
|
||
|
||
|
||
<p id='show_detail_line'>显示
|
||
<a href='javascript:showCase(0)'>概要</a>
|
||
<a href='javascript:showCase(1)'>失败[0]</a>
|
||
<a href='javascript:showCase(2)'>通过[8]</a>
|
||
<a href='javascript:showCase(3)'>所有[8]</a>
|
||
</p>
|
||
<table id='result_table'>
|
||
<colgroup>
|
||
<col align='left' />
|
||
<col align='right' />
|
||
<col align='right' />
|
||
<col align='right' />
|
||
<col align='right' />
|
||
<col align='right' />
|
||
<col align='right' />
|
||
</colgroup>
|
||
<tr id='header_row'>
|
||
<td>用例集/测试用例</td>
|
||
<td>总计</td>
|
||
<td>通过</td>
|
||
<td>失败</td>
|
||
<td>错误</td>
|
||
<td>视图</td>
|
||
<td>错误截图</td>
|
||
</tr>
|
||
|
||
<tr class='passClass'>
|
||
<td>login_sta.Demo_UI: 抽屉新热榜登录测试</td>
|
||
<td>6</td>
|
||
<td>6</td>
|
||
<td>0</td>
|
||
<td>0</td>
|
||
<td><a href="javascript:showClassDetail('c1',6)">详情</a></td>
|
||
<td> </td>
|
||
</tr>
|
||
|
||
<tr id='pt1.1' class='hiddenRow'>
|
||
<td class='passCase'><div class='testcase'>test_login_1: dict() -> new empty dictionary</div></td>
|
||
<td colspan='5' align='center'>
|
||
|
||
<!--css div popup start-->
|
||
<a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_pt1.1')" >
|
||
通过</a>
|
||
|
||
<div id='div_pt1.1' class="popup_window">
|
||
<div style='text-align: right; color:red;cursor:pointer'>
|
||
<a onfocus='this.blur();' onclick="document.getElementById('div_pt1.1').style.display = 'none' " >
|
||
[x]</a>
|
||
</div>
|
||
<pre>
|
||
|
||
pt1.1: [2019-01-28 01:20:29,486] [log.py|__console] [line:40] INFO : 当前执行测试用例ID-> test_login001.1 ; 测试点-> 手机号和密码为空登录
|
||
[2019-01-28 01:20:35,988] [log.py|__console] [line:40] INFO : 检查点-> 手机号不能为空
|
||
[2019-01-28 01:20:36,176] [log.py|__console] [line:40] INFO : 异常登录,返回实际结果是->: 手机号不能为空
|
||
D:\Programs\Python\Python36\lib\site-packages\selenium\webdriver\remote\webdriver.py:1019: UserWarning: name used for saved screenshot does not match file type. It should end with a `.png` extension
|
||
"type. It should end with a `.png` extension", UserWarning)
|
||
|
||
|
||
</pre>
|
||
</div>
|
||
<!--css div popup end-->
|
||
</td>
|
||
<td></td>
|
||
</tr>
|
||
|
||
<tr id='pt1.2' class='hiddenRow'>
|
||
<td class='passCase'><div class='testcase'>test_login_2: dict() -> new empty dictionary</div></td>
|
||
<td colspan='5' align='center'>
|
||
|
||
<!--css div popup start-->
|
||
<a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_pt1.2')" >
|
||
通过</a>
|
||
|
||
<div id='div_pt1.2' class="popup_window">
|
||
<div style='text-align: right; color:red;cursor:pointer'>
|
||
<a onfocus='this.blur();' onclick="document.getElementById('div_pt1.2').style.display = 'none' " >
|
||
[x]</a>
|
||
</div>
|
||
<pre>
|
||
|
||
pt1.2: [2019-01-28 01:20:36,584] [log.py|__console] [line:40] INFO : 当前执行测试用例ID-> test_login001.2 ; 测试点-> 手机号为空登录
|
||
[2019-01-28 01:20:42,365] [log.py|__console] [line:40] INFO : 检查点-> 手机号不能为空
|
||
[2019-01-28 01:20:42,549] [log.py|__console] [line:40] INFO : 异常登录,返回实际结果是->: 手机号不能为空
|
||
|
||
|
||
</pre>
|
||
</div>
|
||
<!--css div popup end-->
|
||
</td>
|
||
<td></td>
|
||
</tr>
|
||
|
||
<tr id='pt1.3' class='hiddenRow'>
|
||
<td class='passCase'><div class='testcase'>test_login_3: dict() -> new empty dictionary</div></td>
|
||
<td colspan='5' align='center'>
|
||
|
||
<!--css div popup start-->
|
||
<a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_pt1.3')" >
|
||
通过</a>
|
||
|
||
<div id='div_pt1.3' class="popup_window">
|
||
<div style='text-align: right; color:red;cursor:pointer'>
|
||
<a onfocus='this.blur();' onclick="document.getElementById('div_pt1.3').style.display = 'none' " >
|
||
[x]</a>
|
||
</div>
|
||
<pre>
|
||
|
||
pt1.3: [2019-01-28 01:20:42,914] [log.py|__console] [line:40] INFO : 当前执行测试用例ID-> test_login001.3 ; 测试点-> 密码为空登录
|
||
[2019-01-28 01:20:48,650] [log.py|__console] [line:40] INFO : 检查点-> 密码不能为空
|
||
[2019-01-28 01:20:48,913] [log.py|__console] [line:40] INFO : 异常登录,返回实际结果是->: 密码不能为空
|
||
|
||
|
||
</pre>
|
||
</div>
|
||
<!--css div popup end-->
|
||
</td>
|
||
<td></td>
|
||
</tr>
|
||
|
||
<tr id='pt1.4' class='hiddenRow'>
|
||
<td class='passCase'><div class='testcase'>test_login_4: dict() -> new empty dictionary</div></td>
|
||
<td colspan='5' align='center'>
|
||
|
||
<!--css div popup start-->
|
||
<a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_pt1.4')" >
|
||
通过</a>
|
||
|
||
<div id='div_pt1.4' class="popup_window">
|
||
<div style='text-align: right; color:red;cursor:pointer'>
|
||
<a onfocus='this.blur();' onclick="document.getElementById('div_pt1.4').style.display = 'none' " >
|
||
[x]</a>
|
||
</div>
|
||
<pre>
|
||
|
||
pt1.4: [2019-01-28 01:20:49,302] [log.py|__console] [line:40] INFO : 当前执行测试用例ID-> test_login001.4 ; 测试点-> 非法手机号登录
|
||
[2019-01-28 01:20:54,889] [log.py|__console] [line:40] INFO : 检查点-> 手机号格式不对
|
||
[2019-01-28 01:20:55,067] [log.py|__console] [line:40] INFO : 异常登录,返回实际结果是->: 手机号格式不对
|
||
|
||
|
||
</pre>
|
||
</div>
|
||
<!--css div popup end-->
|
||
</td>
|
||
<td></td>
|
||
</tr>
|
||
|
||
<tr id='pt1.5' class='hiddenRow'>
|
||
<td class='passCase'><div class='testcase'>test_login_5: dict() -> new empty dictionary</div></td>
|
||
<td colspan='5' align='center'>
|
||
|
||
<!--css div popup start-->
|
||
<a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_pt1.5')" >
|
||
通过</a>
|
||
|
||
<div id='div_pt1.5' class="popup_window">
|
||
<div style='text-align: right; color:red;cursor:pointer'>
|
||
<a onfocus='this.blur();' onclick="document.getElementById('div_pt1.5').style.display = 'none' " >
|
||
[x]</a>
|
||
</div>
|
||
<pre>
|
||
|
||
pt1.5: [2019-01-28 01:20:55,408] [log.py|__console] [line:40] INFO : 当前执行测试用例ID-> test_login001.5 ; 测试点-> 手机号或密码不匹配
|
||
[2019-01-28 01:21:00,861] [log.py|__console] [line:40] INFO : 检查点-> 账号密码错误
|
||
[2019-01-28 01:21:01,074] [log.py|__console] [line:40] INFO : 异常登录,返回实际结果是->: 账号密码错误
|
||
|
||
|
||
</pre>
|
||
</div>
|
||
<!--css div popup end-->
|
||
</td>
|
||
<td></td>
|
||
</tr>
|
||
|
||
<tr id='pt1.6' class='hiddenRow'>
|
||
<td class='passCase'><div class='testcase'>test_login_6: dict() -> new empty dictionary</div></td>
|
||
<td colspan='5' align='center'>
|
||
|
||
<!--css div popup start-->
|
||
<a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_pt1.6')" >
|
||
通过</a>
|
||
|
||
<div id='div_pt1.6' class="popup_window">
|
||
<div style='text-align: right; color:red;cursor:pointer'>
|
||
<a onfocus='this.blur();' onclick="document.getElementById('div_pt1.6').style.display = 'none' " >
|
||
[x]</a>
|
||
</div>
|
||
<pre>
|
||
|
||
pt1.6: [2019-01-28 01:21:01,426] [log.py|__console] [line:40] INFO : 当前执行测试用例ID-> test_login001.6 ; 测试点-> 手机号和密码正确
|
||
[2019-01-28 01:21:06,893] [log.py|__console] [line:40] INFO : 检查点-> yingoja
|
||
[2019-01-28 01:21:07,078] [log.py|__console] [line:40] INFO : 成功登录,返回实际结果是->: yingoja
|
||
[2019-01-28 01:21:07,466] [log.py|__console] [line:40] INFO : -----> 开始执行退出流程操作
|
||
[2019-01-28 01:21:10,550] [log.py|__console] [line:40] INFO : 检查点-> 找到注册元素,表示退出成功!
|
||
[2019-01-28 01:21:10,674] [log.py|__console] [line:40] INFO : 退出登录,返回实际结果是->: 注册
|
||
|
||
|
||
</pre>
|
||
</div>
|
||
<!--css div popup end-->
|
||
</td>
|
||
<td></td>
|
||
</tr>
|
||
|
||
<tr class='passClass'>
|
||
<td>setup_sta.Demo_UI: 首页---设置</td>
|
||
<td>2</td>
|
||
<td>2</td>
|
||
<td>0</td>
|
||
<td>0</td>
|
||
<td><a href="javascript:showClassDetail('c2',2)">详情</a></td>
|
||
<td> </td>
|
||
</tr>
|
||
|
||
<tr id='pt2.1' class='hiddenRow'>
|
||
<td class='passCase'><div class='testcase'>test_setup_1: dict() -> new empty dictionary</div></td>
|
||
<td colspan='5' align='center'>
|
||
|
||
<!--css div popup start-->
|
||
<a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_pt2.1')" >
|
||
通过</a>
|
||
|
||
<div id='div_pt2.1' class="popup_window">
|
||
<div style='text-align: right; color:red;cursor:pointer'>
|
||
<a onfocus='this.blur();' onclick="document.getElementById('div_pt2.1').style.display = 'none' " >
|
||
[x]</a>
|
||
</div>
|
||
<pre>
|
||
|
||
pt2.1: [2019-01-28 01:21:16,235] [log.py|__console] [line:40] INFO : 当前执行测试用例ID-> test_setup001.1 ; 测试点-> 昵称和签名档为空
|
||
[2019-01-28 01:21:31,733] [log.py|__console] [line:40] INFO : 检查点-> 请输入用户昵称
|
||
[2019-01-28 01:21:31,938] [log.py|__console] [line:40] INFO : 返回实际结果是->: 请输入用户昵称
|
||
|
||
|
||
</pre>
|
||
</div>
|
||
<!--css div popup end-->
|
||
</td>
|
||
<td></td>
|
||
</tr>
|
||
|
||
<tr id='pt2.2' class='hiddenRow'>
|
||
<td class='passCase'><div class='testcase'>test_setup_2: dict() -> new empty dictionary</div></td>
|
||
<td colspan='5' align='center'>
|
||
|
||
<!--css div popup start-->
|
||
<a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_pt2.2')" >
|
||
通过</a>
|
||
|
||
<div id='div_pt2.2' class="popup_window">
|
||
<div style='text-align: right; color:red;cursor:pointer'>
|
||
<a onfocus='this.blur();' onclick="document.getElementById('div_pt2.2').style.display = 'none' " >
|
||
[x]</a>
|
||
</div>
|
||
<pre>
|
||
|
||
pt2.2: [2019-01-28 01:21:34,602] [log.py|__console] [line:40] INFO : 当前执行测试用例ID-> test_setup001.2 ; 测试点-> 正常录入保存
|
||
[2019-01-28 01:21:56,089] [log.py|__console] [line:40] INFO : 检查点-> yingoja和自动化测试
|
||
[2019-01-28 01:21:56,464] [log.py|__console] [line:40] INFO : 返回实际结果是->: yingoja和自动化测试
|
||
|
||
|
||
</pre>
|
||
</div>
|
||
<!--css div popup end-->
|
||
</td>
|
||
<td></td>
|
||
</tr>
|
||
|
||
<tr id='total_row'>
|
||
<td>总计</td>
|
||
<td>8</td>
|
||
<td>8</td>
|
||
<td>0</td>
|
||
<td>0</td>
|
||
<td>通过率:100.00%</td>
|
||
<td> </td>
|
||
</tr>
|
||
</table>
|
||
<script>
|
||
drawCircle(8, 0, 0)
|
||
</script>
|
||
|
||
<div id='ending'> </div>
|
||
|
||
</body>
|
||
</html>
|