test: update UI test artifacts including screenshots and reports

This commit is contained in:
2025-10-31 18:02:20 +08:00
parent 81102ec396
commit abe2fa88f8
12 changed files with 412 additions and 48 deletions

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View File

@@ -0,0 +1,347 @@
<!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>

View File

@@ -140,7 +140,7 @@
<div class="container">
<div class="header">
<h1>🤖 UI测试报告</h1>
<p>生成时间: 2025-10-31 17:42:21</p>
<p>生成时间: 2025-10-31 18:01:08</p>
</div>
<div class="section">
@@ -155,7 +155,7 @@
<p>发现问题</p>
</div>
<div class="stat-item">
<h3>88.6%</h3>
<h3>85.1%</h3>
<p>视觉相似度</p>
</div>
<div class="stat-item">
@@ -168,9 +168,9 @@
<div>
<p><strong>视觉相似度进度:</strong></p>
<div class="progress-bar">
<div class="progress-fill" style="width: 89.0%"></div>
<div class="progress-fill" style="width: 85.0%"></div>
</div>
<p>89.0% 相似度</p>
<p>85.0% 相似度</p>
</div>
</div>
@@ -211,7 +211,7 @@
<div class="stats">
<div class="stat-item">
<h3>88.6%</h3>
<h3>85.1%</h3>
<p>相似度得分</p>
</div>
<div class="stat-item">
@@ -219,14 +219,14 @@
<p>差异区域数量</p>
</div>
<div class="stat-item">
<h3>244545.0</h3>
<h3>213605.0</h3>
<p>差异面积(像素)</p>
</div>
</div>
<div class="issue">
⚠️ 视觉差异较大 (11.4%)建议检查UI实现
⚠️ 视觉差异较大 (14.9%)建议检查UI实现
<span class="badge badge-warning">未通过阈值检查</span>
</div>
@@ -247,32 +247,10 @@
</thead>
<tbody>
<tr>
<td>xml_analysis</td>
<td>0.069</td>
<td>20251031_174305</td>
<td>
<span class="badge badge-success">快速</span>
</td>
</tr>
<tr>
<td>screenshot</td>
<td>0.334</td>
<td>20251031_174305</td>
<td>
<span class="badge badge-success">快速</span>
</td>
</tr>
<tr>
<td>screenshot</td>
<td>0.278</td>
<td>20251031_174305</td>
<td>0.289</td>
<td>20251031_180116</td>
<td>
<span class="badge badge-success">快速</span>
@@ -282,8 +260,19 @@
<tr>
<td>xml_analysis</td>
<td>0.055</td>
<td>20251031_174306</td>
<td>0.058</td>
<td>20251031_180148</td>
<td>
<span class="badge badge-success">快速</span>
</td>
</tr>
<tr>
<td>screenshot</td>
<td>0.223</td>
<td>20251031_180148</td>
<td>
<span class="badge badge-success">快速</span>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

View File

@@ -0,0 +1,29 @@
<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>
<hierarchy index="0" class="hierarchy" rotation="0" width="1080" height="1920">
<android.widget.FrameLayout index="0" package="com.example.myapplication" class="android.widget.FrameLayout" text="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" long-clickable="false" password="false" scrollable="false" selected="false" bounds="[0,0][1080,1920]" displayed="true" a11y-important="true" screen-reader-focusable="false" drawing-order="0" showing-hint="false" text-entry-key="false" dismissable="false" a11y-focused="false" heading="false" live-region="0" context-clickable="false" content-invalid="false">
<android.widget.LinearLayout index="0" package="com.example.myapplication" class="android.widget.LinearLayout" text="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" long-clickable="false" password="false" scrollable="false" selected="false" bounds="[0,0][1080,1920]" displayed="true" a11y-important="false" screen-reader-focusable="false" drawing-order="1" showing-hint="false" text-entry-key="false" dismissable="false" a11y-focused="false" heading="false" live-region="0" context-clickable="false" content-invalid="false">
<android.widget.FrameLayout index="0" package="com.example.myapplication" class="android.widget.FrameLayout" text="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" long-clickable="false" password="false" scrollable="false" selected="false" bounds="[0,0][1080,1920]" displayed="true" a11y-important="false" screen-reader-focusable="false" drawing-order="2" showing-hint="false" text-entry-key="false" dismissable="false" a11y-focused="false" heading="false" live-region="0" context-clickable="false" content-invalid="false">
<android.widget.LinearLayout index="0" package="com.example.myapplication" class="android.widget.LinearLayout" text="" resource-id="com.example.myapplication:id/action_bar_root" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" long-clickable="false" password="false" scrollable="false" selected="false" bounds="[0,0][1080,1920]" displayed="true" a11y-important="false" screen-reader-focusable="false" drawing-order="1" showing-hint="false" text-entry-key="false" dismissable="false" a11y-focused="false" heading="false" live-region="0" context-clickable="false" content-invalid="false">
<android.widget.FrameLayout index="0" package="com.example.myapplication" class="android.widget.FrameLayout" text="" resource-id="android:id/content" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" long-clickable="false" password="false" scrollable="false" selected="false" bounds="[0,0][1080,1920]" displayed="true" a11y-important="false" screen-reader-focusable="false" drawing-order="2" showing-hint="false" text-entry-key="false" dismissable="false" a11y-focused="false" heading="false" live-region="0" context-clickable="false" content-invalid="false">
<android.view.ViewGroup index="0" package="com.example.myapplication" class="android.view.ViewGroup" text="" resource-id="com.example.myapplication:id/main" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" long-clickable="false" password="false" scrollable="false" selected="false" bounds="[0,0][1080,1920]" displayed="true" a11y-important="false" screen-reader-focusable="false" drawing-order="1" showing-hint="false" text-entry-key="false" dismissable="false" a11y-focused="false" heading="false" live-region="0" context-clickable="false" content-invalid="false">
<android.view.ViewGroup index="0" package="com.example.myapplication" class="android.view.ViewGroup" text="" resource-id="com.example.myapplication:id/toolbar" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" long-clickable="false" password="false" scrollable="false" selected="false" bounds="[0,72][1080,264]" displayed="true" a11y-important="false" screen-reader-focusable="false" drawing-order="1" showing-hint="false" text-entry-key="false" dismissable="false" a11y-focused="false" heading="false" live-region="0" context-clickable="false" content-invalid="false">
<android.widget.ImageButton index="0" package="com.example.myapplication" class="android.widget.ImageButton" text="" checkable="false" checked="false" clickable="false" enabled="true" focusable="true" focused="false" long-clickable="false" password="false" scrollable="false" selected="false" bounds="[0,84][168,252]" displayed="true" a11y-important="true" screen-reader-focusable="false" drawing-order="2" showing-hint="false" text-entry-key="false" dismissable="false" a11y-focused="false" heading="false" live-region="0" context-clickable="false" content-invalid="false" />
<android.widget.TextView index="1" package="com.example.myapplication" class="android.widget.TextView" text="Title" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" long-clickable="false" password="false" scrollable="false" selected="false" bounds="[476,124][604,212]" displayed="true" a11y-important="true" screen-reader-focusable="false" drawing-order="1" showing-hint="false" text-entry-key="false" dismissable="false" a11y-focused="false" heading="false" live-region="0" context-clickable="false" content-invalid="false" />
<android.widget.ImageView index="2" package="com.example.myapplication" class="android.widget.ImageView" text="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" long-clickable="false" password="false" scrollable="false" selected="false" bounds="[960,108][1080,228]" displayed="true" a11y-important="false" screen-reader-focusable="false" drawing-order="3" showing-hint="false" text-entry-key="false" dismissable="false" a11y-focused="false" heading="false" live-region="0" context-clickable="false" content-invalid="false" />
</android.view.ViewGroup>
<android.widget.ScrollView index="1" package="com.example.myapplication" class="android.widget.ScrollView" text="" checkable="false" checked="false" clickable="false" enabled="true" focusable="true" focused="false" long-clickable="false" password="false" scrollable="true" selected="false" bounds="[0,264][1080,1920]" displayed="true" a11y-important="true" screen-reader-focusable="false" drawing-order="2" showing-hint="false" text-entry-key="false" dismissable="false" a11y-focused="false" heading="false" live-region="0" context-clickable="false" content-invalid="false">
<android.view.ViewGroup index="0" package="com.example.myapplication" class="android.view.ViewGroup" text="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" long-clickable="false" password="false" scrollable="false" selected="false" bounds="[0,264][1080,1920]" displayed="true" a11y-important="false" screen-reader-focusable="false" drawing-order="1" showing-hint="false" text-entry-key="false" dismissable="false" a11y-focused="false" heading="false" live-region="0" context-clickable="false" content-invalid="false">