Files
appium_ui_test/reports/test_report_20251031_175343.html

347 lines
10 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>UI测试报告</title>
<style>
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
margin: 0;
padding: 20px;
background-color: #f5f5f5;
}
.container {
max-width: 1200px;
margin: 0 auto;
background: white;
border-radius: 10px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
overflow: hidden;
}
.header {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 30px;
text-align: center;
}
.header h1 { margin: 0; font-size: 2.5em; }
.header p { margin: 10px 0 0 0; opacity: 0.9; }
.section {
margin: 0;
padding: 25px;
border-bottom: 1px solid #eee;
}
.section:last-child { border-bottom: none; }
.section h2 {
color: #333;
margin-top: 0;
padding-bottom: 10px;
border-bottom: 2px solid #667eea;
}
.issue {
background: #fff3cd;
border: 1px solid #ffeaa7;
color: #856404;
padding: 12px;
margin: 8px 0;
border-radius: 5px;
border-left: 4px solid #f39c12;
}
.success {
background: #d4edda;
border: 1px solid #c3e6cb;
color: #155724;
padding: 12px;
margin: 8px 0;
border-radius: 5px;
border-left: 4px solid #28a745;
}
.error {
background: #f8d7da;
border: 1px solid #f5c6cb;
color: #721c24;
padding: 12px;
margin: 8px 0;
border-radius: 5px;
border-left: 4px solid #dc3545;
}
.stats {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 20px;
margin: 20px 0;
}
.stat-item {
background: #f8f9fa;
padding: 20px;
border-radius: 8px;
text-align: center;
border: 1px solid #e9ecef;
}
.stat-item h3 {
font-size: 2em;
margin: 0;
color: #667eea;
}
.stat-item p {
margin: 5px 0 0 0;
color: #666;
font-weight: 500;
}
.progress-bar {
background: #e9ecef;
border-radius: 10px;
height: 20px;
margin: 10px 0;
overflow: hidden;
}
.progress-fill {
height: 100%;
background: linear-gradient(90deg, #28a745, #20c997);
transition: width 0.3s ease;
}
table {
width: 100%;
border-collapse: collapse;
margin: 15px 0;
background: white;
}
th, td {
border: 1px solid #dee2e6;
padding: 12px;
text-align: left;
}
th {
background: #f8f9fa;
font-weight: 600;
color: #495057;
}
tr:nth-child(even) { background: #f8f9fa; }
.badge {
display: inline-block;
padding: 4px 8px;
border-radius: 12px;
font-size: 0.8em;
font-weight: 500;
}
.badge-success { background: #d4edda; color: #155724; }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-danger { background: #f8d7da; color: #721c24; }
</style>
</head>
<body>
<div class="container">
<div class="header">
<h1>🤖 UI测试报告</h1>
<p>生成时间: 2025-10-31 17:53:43</p>
</div>
<div class="section">
<h2>📊 测试概览</h2>
<div class="stats">
<div class="stat-item">
<h3>18</h3>
<p>总元素数</p>
</div>
<div class="stat-item">
<h3>1</h3>
<p>发现问题</p>
</div>
<div class="stat-item">
<h3>88.6%</h3>
<p>视觉相似度</p>
</div>
<div class="stat-item">
<h3>100%</h3>
<p>性能评分</p>
</div>
</div>
<div>
<p><strong>视觉相似度进度:</strong></p>
<div class="progress-bar">
<div class="progress-fill" style="width: 89.0%"></div>
</div>
<p>89.0% 相似度</p>
</div>
</div>
<div class="section">
<h2>📱 XML布局分析</h2>
<div class="stats">
<div class="stat-item">
<h3>1</h3>
<p>可点击元素</p>
</div>
<div class="stat-item">
<h3>0</h3>
<p>文本元素</p>
</div>
<div class="stat-item">
<h3>9</h3>
<p>最大层级深度</p>
</div>
</div>
<h3>🔍 发现的问题:</h3>
<div class="issue">
<strong>android.widget.Button</strong>: 可点击元素缺少content-desc
<small style="color: #666;"> (位置: 333,1518)</small>
</div>
</div>
<div class="section">
<h2>👁️ 视觉比对分析</h2>
<div class="stats">
<div class="stat-item">
<h3>88.6%</h3>
<p>相似度得分</p>
</div>
<div class="stat-item">
<h3>1</h3>
<p>差异区域数量</p>
</div>
<div class="stat-item">
<h3>244545.0</h3>
<p>差异面积(像素)</p>
</div>
</div>
<div class="issue">
⚠️ 视觉差异较大 (11.4%)建议检查UI实现
<span class="badge badge-warning">未通过阈值检查</span>
</div>
</div>
<div class="section">
<h2>⚡ 性能数据</h2>
<table>
<thead>
<tr>
<th>操作类型</th>
<th>执行时间(秒)</th>
<th>时间戳</th>
<th>状态</th>
</tr>
</thead>
<tbody>
<tr>
<td>screenshot</td>
<td>0.277</td>
<td>20251031_175354</td>
<td>
<span class="badge badge-success">快速</span>
</td>
</tr>
<tr>
<td>xml_analysis</td>
<td>0.052</td>
<td>20251031_175356</td>
<td>
<span class="badge badge-success">快速</span>
</td>
</tr>
<tr>
<td>screenshot</td>
<td>0.320</td>
<td>20251031_175404</td>
<td>
<span class="badge badge-success">快速</span>
</td>
</tr>
<tr>
<td>xml_analysis</td>
<td>0.030</td>
<td>20251031_175426</td>
<td>
<span class="badge badge-success">快速</span>
</td>
</tr>
<tr>
<td>screenshot</td>
<td>0.274</td>
<td>20251031_175426</td>
<td>
<span class="badge badge-success">快速</span>
</td>
</tr>
<tr>
<td>screenshot</td>
<td>0.258</td>
<td>20251031_175503</td>
<td>
<span class="badge badge-success">快速</span>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section">
<h2>📋 建议和总结</h2>
<div class="issue">
🔧 发现 1 个布局问题,建议优化可访问性和用户体验
</div>
<div class="error">
🎨 视觉差异超过10%建议检查UI实现是否符合设计要求
</div>
<div class="success">
✅ 测试完成详细数据已记录。建议定期进行UI测试以确保应用质量。
</div>
</div>
</div>
</body>
</html>