提交 b7bcebb6 authored 作者: 陈泽健's avatar 陈泽健

调试write_xlsx_data函数与统一平台的窗口切换关闭。

上级 c38ef627
<!DOCTYPE html>
<html>
<head>
<title>会议预约测试报告</title>
<meta charset="UTF-8">
<style>body {
font-family: consolas, Verdana, sans-serif;
font-size: 1.2em;
color: #696e71;
display: grid;
grid-template-columns: 1fr 5rem;
}
.main_section {
width: 90%;
margin: 0 auto;
}
#float_menu{
position:fixed;
top:0;
right:0;
text-align: center;
}
#float_menu .menu-item {
cursor: pointer;
padding: .5em;
margin: .5em 0;
color: #c08580;
background-color: #f8f0ef;
font-size: 1.2em;
}
.result{
display: flex;
}
.result_table{
border-collapse: collapse;
border: 1px solid #f0e0e5;
width: 30em;
text-align: center;
font-size: 1.0em;
}
.result_table td{
border: 1px solid #f0e0e5;
padding: .3em;
}
.result_barchart{
width: 30em;
margin: 0 5em 0 5em;
}
.barchar_item{
margin: 2.5rem 0;
}
.barchart_barbox {
margin: 0.5em 0;
width: 100%;
background-color: #fff;
border: 1px solid #86c2dd;
border-radius: .2em;
}
.barchart_bar {
text-align: right;
height: 1.2rem;
}
.h3_button {
margin: 1.5em;
cursor: pointer;
color: #03a9f4;
}
.info
{
white-space:pre-wrap;
margin: .8em 1.5em;
}
.error-info
{
color: #a64747
}
.suite_dir {
margin: 1em .2em;
padding: .3em;
/* background-color: #dfeff6; */
border: 1px solid #bcd8e4;
}
.suite_file {
margin: 1em .2em;
padding: .3em;
border: 1px solid #bcd8e4;
}
.case {
margin: 1em .2em;
/* padding: .3em; */
border: 1px solid #e7d4d4;
}
.case_class_path{
margin: 0em 1em;
}
.folder_header {
padding: .2em .7em;
background-color: #fffaf9;
cursor: pointer;
}
.setup{
margin: .2em;
/* padding: .3em; */
/* border: 1px solid #e7d4d4; */
}
.teardown{
margin: .2em;
/* padding: .3em;*/
/* border: 1px solid #e7d4d4; */
}
.test_steps{
margin: .2em;
padding: .3em;
/* border: 1px solid #e7d4d4; */
}
.label {
display: inline-block;
padding: .1em .5em;
font-size: .88em;
letter-spacing: 1px;
white-space: nowrap;
color: #0d6ebc;
border-radius: .2em;
min-width: 5em;
margin-right: 2em;
font-family: consolas;
}
/* .suite_setup .label{
color: #219e26 ;
}
.suite_teardown .label{
color: #219e26;
} */
/* .case.pass .casename{
color: #329132 ;
} */
.case.pass .caselabel{
color: white;
background-color: #3b9e3f;
}
/* .case.fail .casename{
color: #a64747;
} */
.case.fail .caselabel{
color: white;
background-color: #a64747;
}
/* .case.abort .casename{
color: #953ab7;
} */
.case.abort .caselabel{
color: white;
background-color: #9c27b0;
}
.case_step {
margin: .8em;
}
.checkpoint_pass {
margin: .8em;
}
.checkpoint_fail {
margin: .8em;
}
.case_step .tag{
color: #2196f3;;
margin: .3em 1em .3em 0;
padding: .1em .3em;
font-size: .92em;
}
.checkpoint_pass .tag{
color: #009806;
margin:.3em 1em .3em .5em;
padding: .1em .3em;
font-size: .92em;
}
.checkpoint_fail .tag{
color: #9c2020;
margin:.3em 1em .3em .5em;
padding: .1em .3em;
font-size: .92em;
}
.screenshot {
border: 1px solid #86c2dd;
}
.executetime {
float: right;
}
/* 模态框内容 */
.modal-content {
margin: auto;
display: block;
width: 95%;
max-width: 700px;
max-height: 80vh; /* 设置最大高度为视口高度的80% */
object-fit: contain; /* 保持图片的宽高比 */
zoom: 3;
}
/* 模态框 */
.modal {
display: none; /* 隐藏 */
position: fixed; /* 固定位置 */
z-index: 1; /* 坐在顶部 */
padding-top: 40px; /* 在图片上方添加一些内边距 */
left: 0;
top: 0;
width: 100%; /* 宽度 */
height: 100%; /* 高度 */
overflow: auto; /* 启用滚动 */
background-color: rgb(0,0,0); /* 背景颜色 */
background-color: rgba(0,0,0,0.9); /* 黑色背景半透明 */
}
/* 关闭按钮 */
.close {
position: absolute; /* 定义元素的定位方式为绝对定位 */
top: 10px; /* 距离最近的已定位祖先元素顶部15像素 */
right: 30px; /* 距离最近的已定位祖先元素右侧35像素 */
color: #f1f1f1; /* 文本颜色为浅灰色 */
font-size: 15px; /* 字体大小为40像素 */
font-weight: bold; /* 字体加粗 */
transition: 0.3s; /* 过渡效果,0.3秒内完成 */
}
.close:hover,
.close:focus {
color: #bbb;
text-decoration: none;
cursor: pointer;
}
</style>
<script type="text/javascript">var FOLDER_ALL_CASES = false; // 是否为精简模式的标记
var ERROR_INFOS = []; // 错误信息列表
var current_error_idx = -1;
// 页面加载后执行的函数
window.addEventListener("load", function(){
// 所有 .folder_header 添加点击事件处理
let folderHeaderEles = document.querySelectorAll(".folder_header");
folderHeaderEles.forEach(function(ele) {
ele.addEventListener("click", function(event) {
let fb = event.target.closest('.folder_header').nextElementSibling;
fb.style.display = fb.style.display === 'none' ? 'block' : 'none';
});
});
// 找到所有的错误信息对象
ERROR_INFOS = document.querySelectorAll(".error-info");
// 获取所有图片元素
let images = document.querySelectorAll('.modal-image');
// 获取模态框元素
let modal = document.getElementById("imageModal");
// 获取模态框中的图片元素
let modalImg = document.getElementById("img01");
// 获取关闭按钮元素
let span = document.getElementsByClassName("close")[0];
// 为每个图片添加点击事件监听器
images.forEach(function(img) {
img.addEventListener("click", function() {
modal.style.display = "block"; // 显示模态框
modalImg.src = this.src; // 设置模态框中的图片为点击的图片
});
});
// 当点击关闭按钮时,隐藏模态框
span.onclick = function() {
modal.style.display = "none";
};
// 当点击模态框外区域时,隐藏模态框
window.onclick = function(event) {
if (event.target == modal) {
modal.style.display = "none";
}
};
});
function toggle_folder_all_cases(){
let eles = document.querySelectorAll(".folder_body");
FOLDER_ALL_CASES = !FOLDER_ALL_CASES;
document.getElementById('display_mode').innerHTML = FOLDER_ALL_CASES ? "Detail" : "Summary";
for (const ele of eles){
ele.style.display = FOLDER_ALL_CASES ? "none" : "block";
}
}
function previous_error(){
// 查找错误必须是详细模式
if (FOLDER_ALL_CASES)
toggle_folder_all_cases()
current_error_idx -= 1;
if (current_error_idx < 0)
current_error_idx = 0;
let error = ERROR_INFOS[current_error_idx];
error.scrollIntoView({behavior: "smooth", block: "center", inline: "start"});
}
function next_error(){
// 查找错误必须是详细模式
if (FOLDER_ALL_CASES)
toggle_folder_all_cases()
current_error_idx += 1;
if (current_error_idx > ERROR_INFOS.length - 1)
current_error_idx = ERROR_INFOS.length - 1;
let error = ERROR_INFOS[current_error_idx];
error.scrollIntoView({behavior: "smooth", block: "center", inline: "start"});
}
</script>
</head>
<body>
<div class="modal" id="imageModal">
<div>
<img class="modal-content" id="img01">
<span class="close">关闭</span>
</div>
</div>
<div class="main_section">
<h1 style="font-family: auto">会议预约测试报告</h1>
<h3>统计结果</h3>
<div class="result">
<table class="result_table">
<tbody>
<tr>
<td>hytest 版本</td>
<td>0.8.12</td>
</tr>
<tr>
<td>开始时间</td>
<td>2025/03/21 17:18:58</td>
</tr>
<tr>
<td>结束时间</td>
<td>2025/03/21 17:19:49</td>
</tr>
<tr>
<td>耗时</td>
<td>50.609 秒</td>
</tr>
<tr>
<td>预备执行用例数量</td>
<td>1</td>
</tr>
<tr>
<td>实际执用例行数量</td>
<td>1</td>
</tr>
<tr>
<td>通过</td>
<td>1</td>
</tr>
<tr>
<td>失败</td>
<td style="">0</td>
</tr>
<tr>
<td>异常</td>
<td style="">0</td>
</tr>
<tr>
<td>阻塞</td>
<td style="">0</td>
</tr>
<tr>
<td>套件初始化失败</td>
<td style="">0</td>
</tr>
<tr>
<td>套件清除 失败</td>
<td style="">0</td>
</tr>
<tr>
<td>用例初始化失败</td>
<td style="">0</td>
</tr>
<tr>
<td>用例清除 失败</td>
<td style="">0</td>
</tr>
</tbody>
</table>
<div class="result_barchart">
<div class="barchar_item">
<span>用例通过 100% : 1 个</span>
<div class="barchart_barbox">
<div class="barchart_bar" style="width: 100.0%; background-color: #04AA6D;"></div>
</div>
</div>
<div class="barchar_item">
<span>用例失败 0% : 0 个</span>
<div class="barchart_barbox">
<div class="barchart_bar" style="width: 0.0%; background-color: #bb4069;"></div>
</div>
</div>
<div class="barchar_item">
<span>用例异常 0% : 0 个</span>
<div class="barchart_barbox">
<div class="barchart_bar" style="width: 0.0%; background-color: #9c27b0;"></div>
</div>
</div>
<div class="barchar_item">
<span>用例阻塞 0% : 0 个</span>
<div class="barchart_barbox">
<div class="barchart_bar" style="width: 0.0%; background-color: #dcbdbd;"></div>
</div>
</div>
</div>
</div>
<div style="margin-top:2em">
<h3 style="display:inline">执行日志</h3>
</div>
<div class="exec_log">
<div class="suite_dir" id="suite_dir cases\主流程功能\">
<div>
<span class="label">进入目录</span>
<span>cases\主流程功能\</span>
</div>
<div class="suite_setup setup" id="suite_setup setup cases\主流程功能\">
<div class="folder_header">
<span class="label">套件初始化</span>
<span>cases\主流程功能\</span>
<span class="executetime">2025-03-21 17:18:58</span>
</div>
<div class="folder_body">
<div class="case_step">
<span class="tag">步骤 #1</span>
<span>初始化浏览器</span>
</div>
<div class="info">'----------' 正在初始化浏览器 '----------'</div>
<div class="info">'----------' 浏览器初始化完成 '----------'</div>
<div class="case_step">
<span class="tag">步骤 #2</span>
<span>登录系统</span>
</div>
</div>
</div>
</div>
<div class="suite_file" id="suite_file cases\主流程功能\04调试创建会议.py">
<div>
<span class="label">进入文件</span>
<span>cases\主流程功能\04调试创建会议.py</span>
</div>
<div class="case pass" id="case_00000001">
<div class="folder_header">
<span class="label caselabel">用例 PASS</span>
<span class="casename">Unified_Platform_0001</span>
<span class="executetime">2025-03-21 17:19:31</span>
</div>
<div class="folder_body">
<span class="case_class_path">cases\主流程功能\04调试创建会议.py::Unified_Platform_0001</span>
<div class="test_steps" id="test_steps Unified_Platform_0001">
<span class="label">测试步骤</span>
</div>
</div>
</div>
<div class="suite_teardown teardown" id="suite_teardown teardown cases\主流程功能\">
<div class="folder_header">
<span class="label">套件清除</span>
<span>cases\主流程功能\</span>
<span class="executetime">2025-03-21 17:19:46</span>
</div>
<div class="folder_body">
<div class="info">清除浏览器</div>
</div>
</div>
</div>
</div>
</div>
<div id="float_menu">
<div class="menu-item" onclick="document.querySelector(&quot;body&quot;).scrollIntoView()">页首</div>
<div class="menu-item" onclick="window.open(&quot;http://www.byhy.net/tut/auto/hytest/01&quot;, &quot;_blank&quot;); ">帮助</div>
<div class="menu-item" id="display_mode" onclick="toggle_folder_all_cases()">Summary</div>
<div class="error_jumper" display="none">
<div class="menu-item" onclick="previous_error()" title="上一个错误"></div>
<div class="menu-item" onclick="next_error()" title="下一个错误"></div>
</div>
</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>会议预约测试报告</title>
<meta charset="UTF-8">
<style>body {
font-family: consolas, Verdana, sans-serif;
font-size: 1.2em;
color: #696e71;
display: grid;
grid-template-columns: 1fr 5rem;
}
.main_section {
width: 90%;
margin: 0 auto;
}
#float_menu{
position:fixed;
top:0;
right:0;
text-align: center;
}
#float_menu .menu-item {
cursor: pointer;
padding: .5em;
margin: .5em 0;
color: #c08580;
background-color: #f8f0ef;
font-size: 1.2em;
}
.result{
display: flex;
}
.result_table{
border-collapse: collapse;
border: 1px solid #f0e0e5;
width: 30em;
text-align: center;
font-size: 1.0em;
}
.result_table td{
border: 1px solid #f0e0e5;
padding: .3em;
}
.result_barchart{
width: 30em;
margin: 0 5em 0 5em;
}
.barchar_item{
margin: 2.5rem 0;
}
.barchart_barbox {
margin: 0.5em 0;
width: 100%;
background-color: #fff;
border: 1px solid #86c2dd;
border-radius: .2em;
}
.barchart_bar {
text-align: right;
height: 1.2rem;
}
.h3_button {
margin: 1.5em;
cursor: pointer;
color: #03a9f4;
}
.info
{
white-space:pre-wrap;
margin: .8em 1.5em;
}
.error-info
{
color: #a64747
}
.suite_dir {
margin: 1em .2em;
padding: .3em;
/* background-color: #dfeff6; */
border: 1px solid #bcd8e4;
}
.suite_file {
margin: 1em .2em;
padding: .3em;
border: 1px solid #bcd8e4;
}
.case {
margin: 1em .2em;
/* padding: .3em; */
border: 1px solid #e7d4d4;
}
.case_class_path{
margin: 0em 1em;
}
.folder_header {
padding: .2em .7em;
background-color: #fffaf9;
cursor: pointer;
}
.setup{
margin: .2em;
/* padding: .3em; */
/* border: 1px solid #e7d4d4; */
}
.teardown{
margin: .2em;
/* padding: .3em;*/
/* border: 1px solid #e7d4d4; */
}
.test_steps{
margin: .2em;
padding: .3em;
/* border: 1px solid #e7d4d4; */
}
.label {
display: inline-block;
padding: .1em .5em;
font-size: .88em;
letter-spacing: 1px;
white-space: nowrap;
color: #0d6ebc;
border-radius: .2em;
min-width: 5em;
margin-right: 2em;
font-family: consolas;
}
/* .suite_setup .label{
color: #219e26 ;
}
.suite_teardown .label{
color: #219e26;
} */
/* .case.pass .casename{
color: #329132 ;
} */
.case.pass .caselabel{
color: white;
background-color: #3b9e3f;
}
/* .case.fail .casename{
color: #a64747;
} */
.case.fail .caselabel{
color: white;
background-color: #a64747;
}
/* .case.abort .casename{
color: #953ab7;
} */
.case.abort .caselabel{
color: white;
background-color: #9c27b0;
}
.case_step {
margin: .8em;
}
.checkpoint_pass {
margin: .8em;
}
.checkpoint_fail {
margin: .8em;
}
.case_step .tag{
color: #2196f3;;
margin: .3em 1em .3em 0;
padding: .1em .3em;
font-size: .92em;
}
.checkpoint_pass .tag{
color: #009806;
margin:.3em 1em .3em .5em;
padding: .1em .3em;
font-size: .92em;
}
.checkpoint_fail .tag{
color: #9c2020;
margin:.3em 1em .3em .5em;
padding: .1em .3em;
font-size: .92em;
}
.screenshot {
border: 1px solid #86c2dd;
}
.executetime {
float: right;
}
/* 模态框内容 */
.modal-content {
margin: auto;
display: block;
width: 95%;
max-width: 700px;
max-height: 80vh; /* 设置最大高度为视口高度的80% */
object-fit: contain; /* 保持图片的宽高比 */
zoom: 3;
}
/* 模态框 */
.modal {
display: none; /* 隐藏 */
position: fixed; /* 固定位置 */
z-index: 1; /* 坐在顶部 */
padding-top: 40px; /* 在图片上方添加一些内边距 */
left: 0;
top: 0;
width: 100%; /* 宽度 */
height: 100%; /* 高度 */
overflow: auto; /* 启用滚动 */
background-color: rgb(0,0,0); /* 背景颜色 */
background-color: rgba(0,0,0,0.9); /* 黑色背景半透明 */
}
/* 关闭按钮 */
.close {
position: absolute; /* 定义元素的定位方式为绝对定位 */
top: 10px; /* 距离最近的已定位祖先元素顶部15像素 */
right: 30px; /* 距离最近的已定位祖先元素右侧35像素 */
color: #f1f1f1; /* 文本颜色为浅灰色 */
font-size: 15px; /* 字体大小为40像素 */
font-weight: bold; /* 字体加粗 */
transition: 0.3s; /* 过渡效果,0.3秒内完成 */
}
.close:hover,
.close:focus {
color: #bbb;
text-decoration: none;
cursor: pointer;
}
</style>
<script type="text/javascript">var FOLDER_ALL_CASES = false; // 是否为精简模式的标记
var ERROR_INFOS = []; // 错误信息列表
var current_error_idx = -1;
// 页面加载后执行的函数
window.addEventListener("load", function(){
// 所有 .folder_header 添加点击事件处理
let folderHeaderEles = document.querySelectorAll(".folder_header");
folderHeaderEles.forEach(function(ele) {
ele.addEventListener("click", function(event) {
let fb = event.target.closest('.folder_header').nextElementSibling;
fb.style.display = fb.style.display === 'none' ? 'block' : 'none';
});
});
// 找到所有的错误信息对象
ERROR_INFOS = document.querySelectorAll(".error-info");
// 获取所有图片元素
let images = document.querySelectorAll('.modal-image');
// 获取模态框元素
let modal = document.getElementById("imageModal");
// 获取模态框中的图片元素
let modalImg = document.getElementById("img01");
// 获取关闭按钮元素
let span = document.getElementsByClassName("close")[0];
// 为每个图片添加点击事件监听器
images.forEach(function(img) {
img.addEventListener("click", function() {
modal.style.display = "block"; // 显示模态框
modalImg.src = this.src; // 设置模态框中的图片为点击的图片
});
});
// 当点击关闭按钮时,隐藏模态框
span.onclick = function() {
modal.style.display = "none";
};
// 当点击模态框外区域时,隐藏模态框
window.onclick = function(event) {
if (event.target == modal) {
modal.style.display = "none";
}
};
});
function toggle_folder_all_cases(){
let eles = document.querySelectorAll(".folder_body");
FOLDER_ALL_CASES = !FOLDER_ALL_CASES;
document.getElementById('display_mode').innerHTML = FOLDER_ALL_CASES ? "Detail" : "Summary";
for (const ele of eles){
ele.style.display = FOLDER_ALL_CASES ? "none" : "block";
}
}
function previous_error(){
// 查找错误必须是详细模式
if (FOLDER_ALL_CASES)
toggle_folder_all_cases()
current_error_idx -= 1;
if (current_error_idx < 0)
current_error_idx = 0;
let error = ERROR_INFOS[current_error_idx];
error.scrollIntoView({behavior: "smooth", block: "center", inline: "start"});
}
function next_error(){
// 查找错误必须是详细模式
if (FOLDER_ALL_CASES)
toggle_folder_all_cases()
current_error_idx += 1;
if (current_error_idx > ERROR_INFOS.length - 1)
current_error_idx = ERROR_INFOS.length - 1;
let error = ERROR_INFOS[current_error_idx];
error.scrollIntoView({behavior: "smooth", block: "center", inline: "start"});
}
</script>
</head>
<body>
<div class="modal" id="imageModal">
<div>
<img class="modal-content" id="img01">
<span class="close">关闭</span>
</div>
</div>
<div class="main_section">
<h1 style="font-family: auto">会议预约测试报告</h1>
<h3>统计结果</h3>
<div class="result">
<table class="result_table">
<tbody>
<tr>
<td>hytest 版本</td>
<td>0.8.12</td>
</tr>
<tr>
<td>开始时间</td>
<td>2025/03/21 17:20:06</td>
</tr>
<tr>
<td>结束时间</td>
<td>2025/03/21 17:20:28</td>
</tr>
<tr>
<td>耗时</td>
<td>22.699 秒</td>
</tr>
<tr>
<td>预备执行用例数量</td>
<td>1</td>
</tr>
<tr>
<td>实际执用例行数量</td>
<td>1</td>
</tr>
<tr>
<td>通过</td>
<td>1</td>
</tr>
<tr>
<td>失败</td>
<td style="">0</td>
</tr>
<tr>
<td>异常</td>
<td style="">0</td>
</tr>
<tr>
<td>阻塞</td>
<td style="">0</td>
</tr>
<tr>
<td>套件初始化失败</td>
<td style="">0</td>
</tr>
<tr>
<td>套件清除 失败</td>
<td style="">0</td>
</tr>
<tr>
<td>用例初始化失败</td>
<td style="">0</td>
</tr>
<tr>
<td>用例清除 失败</td>
<td style="">0</td>
</tr>
</tbody>
</table>
<div class="result_barchart">
<div class="barchar_item">
<span>用例通过 100% : 1 个</span>
<div class="barchart_barbox">
<div class="barchart_bar" style="width: 100.0%; background-color: #04AA6D;"></div>
</div>
</div>
<div class="barchar_item">
<span>用例失败 0% : 0 个</span>
<div class="barchart_barbox">
<div class="barchart_bar" style="width: 0.0%; background-color: #bb4069;"></div>
</div>
</div>
<div class="barchar_item">
<span>用例异常 0% : 0 个</span>
<div class="barchart_barbox">
<div class="barchart_bar" style="width: 0.0%; background-color: #9c27b0;"></div>
</div>
</div>
<div class="barchar_item">
<span>用例阻塞 0% : 0 个</span>
<div class="barchart_barbox">
<div class="barchart_bar" style="width: 0.0%; background-color: #dcbdbd;"></div>
</div>
</div>
</div>
</div>
<div style="margin-top:2em">
<h3 style="display:inline">执行日志</h3>
</div>
<div class="exec_log">
<div class="suite_dir" id="suite_dir cases\主流程功能\">
<div>
<span class="label">进入目录</span>
<span>cases\主流程功能\</span>
</div>
<div class="suite_setup setup" id="suite_setup setup cases\主流程功能\">
<div class="folder_header">
<span class="label">套件初始化</span>
<span>cases\主流程功能\</span>
<span class="executetime">2025-03-21 17:20:06</span>
</div>
<div class="folder_body">
<div class="case_step">
<span class="tag">步骤 #1</span>
<span>初始化浏览器</span>
</div>
<div class="info">'----------' 正在初始化浏览器 '----------'</div>
<div class="info">'----------' 浏览器初始化完成 '----------'</div>
<div class="case_step">
<span class="tag">步骤 #2</span>
<span>登录系统</span>
</div>
</div>
</div>
</div>
<div class="suite_file" id="suite_file cases\主流程功能\04调试创建会议.py">
<div>
<span class="label">进入文件</span>
<span>cases\主流程功能\04调试创建会议.py</span>
</div>
<div class="case pass" id="case_00000001">
<div class="folder_header">
<span class="label caselabel">用例 PASS</span>
<span class="casename">Unified_Platform_0001</span>
<span class="executetime">2025-03-21 17:20:14</span>
</div>
<div class="folder_body">
<span class="case_class_path">cases\主流程功能\04调试创建会议.py::Unified_Platform_0001</span>
<div class="test_steps" id="test_steps Unified_Platform_0001">
<span class="label">测试步骤</span>
</div>
</div>
</div>
<div class="suite_teardown teardown" id="suite_teardown teardown cases\主流程功能\">
<div class="folder_header">
<span class="label">套件清除</span>
<span>cases\主流程功能\</span>
<span class="executetime">2025-03-21 17:20:26</span>
</div>
<div class="folder_body">
<div class="info">清除浏览器</div>
</div>
</div>
</div>
</div>
</div>
<div id="float_menu">
<div class="menu-item" onclick="document.querySelector(&quot;body&quot;).scrollIntoView()">页首</div>
<div class="menu-item" onclick="window.open(&quot;http://www.byhy.net/tut/auto/hytest/01&quot;, &quot;_blank&quot;); ">帮助</div>
<div class="menu-item" id="display_mode" onclick="toggle_folder_all_cases()">Summary</div>
<div class="error_jumper" display="none">
<div class="menu-item" onclick="previous_error()" title="上一个错误"></div>
<div class="menu-item" onclick="next_error()" title="下一个错误"></div>
</div>
</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>会议预约测试报告</title>
<meta charset="UTF-8">
<style>body {
font-family: consolas, Verdana, sans-serif;
font-size: 1.2em;
color: #696e71;
display: grid;
grid-template-columns: 1fr 5rem;
}
.main_section {
width: 90%;
margin: 0 auto;
}
#float_menu{
position:fixed;
top:0;
right:0;
text-align: center;
}
#float_menu .menu-item {
cursor: pointer;
padding: .5em;
margin: .5em 0;
color: #c08580;
background-color: #f8f0ef;
font-size: 1.2em;
}
.result{
display: flex;
}
.result_table{
border-collapse: collapse;
border: 1px solid #f0e0e5;
width: 30em;
text-align: center;
font-size: 1.0em;
}
.result_table td{
border: 1px solid #f0e0e5;
padding: .3em;
}
.result_barchart{
width: 30em;
margin: 0 5em 0 5em;
}
.barchar_item{
margin: 2.5rem 0;
}
.barchart_barbox {
margin: 0.5em 0;
width: 100%;
background-color: #fff;
border: 1px solid #86c2dd;
border-radius: .2em;
}
.barchart_bar {
text-align: right;
height: 1.2rem;
}
.h3_button {
margin: 1.5em;
cursor: pointer;
color: #03a9f4;
}
.info
{
white-space:pre-wrap;
margin: .8em 1.5em;
}
.error-info
{
color: #a64747
}
.suite_dir {
margin: 1em .2em;
padding: .3em;
/* background-color: #dfeff6; */
border: 1px solid #bcd8e4;
}
.suite_file {
margin: 1em .2em;
padding: .3em;
border: 1px solid #bcd8e4;
}
.case {
margin: 1em .2em;
/* padding: .3em; */
border: 1px solid #e7d4d4;
}
.case_class_path{
margin: 0em 1em;
}
.folder_header {
padding: .2em .7em;
background-color: #fffaf9;
cursor: pointer;
}
.setup{
margin: .2em;
/* padding: .3em; */
/* border: 1px solid #e7d4d4; */
}
.teardown{
margin: .2em;
/* padding: .3em;*/
/* border: 1px solid #e7d4d4; */
}
.test_steps{
margin: .2em;
padding: .3em;
/* border: 1px solid #e7d4d4; */
}
.label {
display: inline-block;
padding: .1em .5em;
font-size: .88em;
letter-spacing: 1px;
white-space: nowrap;
color: #0d6ebc;
border-radius: .2em;
min-width: 5em;
margin-right: 2em;
font-family: consolas;
}
/* .suite_setup .label{
color: #219e26 ;
}
.suite_teardown .label{
color: #219e26;
} */
/* .case.pass .casename{
color: #329132 ;
} */
.case.pass .caselabel{
color: white;
background-color: #3b9e3f;
}
/* .case.fail .casename{
color: #a64747;
} */
.case.fail .caselabel{
color: white;
background-color: #a64747;
}
/* .case.abort .casename{
color: #953ab7;
} */
.case.abort .caselabel{
color: white;
background-color: #9c27b0;
}
.case_step {
margin: .8em;
}
.checkpoint_pass {
margin: .8em;
}
.checkpoint_fail {
margin: .8em;
}
.case_step .tag{
color: #2196f3;;
margin: .3em 1em .3em 0;
padding: .1em .3em;
font-size: .92em;
}
.checkpoint_pass .tag{
color: #009806;
margin:.3em 1em .3em .5em;
padding: .1em .3em;
font-size: .92em;
}
.checkpoint_fail .tag{
color: #9c2020;
margin:.3em 1em .3em .5em;
padding: .1em .3em;
font-size: .92em;
}
.screenshot {
border: 1px solid #86c2dd;
}
.executetime {
float: right;
}
/* 模态框内容 */
.modal-content {
margin: auto;
display: block;
width: 95%;
max-width: 700px;
max-height: 80vh; /* 设置最大高度为视口高度的80% */
object-fit: contain; /* 保持图片的宽高比 */
zoom: 3;
}
/* 模态框 */
.modal {
display: none; /* 隐藏 */
position: fixed; /* 固定位置 */
z-index: 1; /* 坐在顶部 */
padding-top: 40px; /* 在图片上方添加一些内边距 */
left: 0;
top: 0;
width: 100%; /* 宽度 */
height: 100%; /* 高度 */
overflow: auto; /* 启用滚动 */
background-color: rgb(0,0,0); /* 背景颜色 */
background-color: rgba(0,0,0,0.9); /* 黑色背景半透明 */
}
/* 关闭按钮 */
.close {
position: absolute; /* 定义元素的定位方式为绝对定位 */
top: 10px; /* 距离最近的已定位祖先元素顶部15像素 */
right: 30px; /* 距离最近的已定位祖先元素右侧35像素 */
color: #f1f1f1; /* 文本颜色为浅灰色 */
font-size: 15px; /* 字体大小为40像素 */
font-weight: bold; /* 字体加粗 */
transition: 0.3s; /* 过渡效果,0.3秒内完成 */
}
.close:hover,
.close:focus {
color: #bbb;
text-decoration: none;
cursor: pointer;
}
</style>
<script type="text/javascript">var FOLDER_ALL_CASES = false; // 是否为精简模式的标记
var ERROR_INFOS = []; // 错误信息列表
var current_error_idx = -1;
// 页面加载后执行的函数
window.addEventListener("load", function(){
// 所有 .folder_header 添加点击事件处理
let folderHeaderEles = document.querySelectorAll(".folder_header");
folderHeaderEles.forEach(function(ele) {
ele.addEventListener("click", function(event) {
let fb = event.target.closest('.folder_header').nextElementSibling;
fb.style.display = fb.style.display === 'none' ? 'block' : 'none';
});
});
// 找到所有的错误信息对象
ERROR_INFOS = document.querySelectorAll(".error-info");
// 获取所有图片元素
let images = document.querySelectorAll('.modal-image');
// 获取模态框元素
let modal = document.getElementById("imageModal");
// 获取模态框中的图片元素
let modalImg = document.getElementById("img01");
// 获取关闭按钮元素
let span = document.getElementsByClassName("close")[0];
// 为每个图片添加点击事件监听器
images.forEach(function(img) {
img.addEventListener("click", function() {
modal.style.display = "block"; // 显示模态框
modalImg.src = this.src; // 设置模态框中的图片为点击的图片
});
});
// 当点击关闭按钮时,隐藏模态框
span.onclick = function() {
modal.style.display = "none";
};
// 当点击模态框外区域时,隐藏模态框
window.onclick = function(event) {
if (event.target == modal) {
modal.style.display = "none";
}
};
});
function toggle_folder_all_cases(){
let eles = document.querySelectorAll(".folder_body");
FOLDER_ALL_CASES = !FOLDER_ALL_CASES;
document.getElementById('display_mode').innerHTML = FOLDER_ALL_CASES ? "Detail" : "Summary";
for (const ele of eles){
ele.style.display = FOLDER_ALL_CASES ? "none" : "block";
}
}
function previous_error(){
// 查找错误必须是详细模式
if (FOLDER_ALL_CASES)
toggle_folder_all_cases()
current_error_idx -= 1;
if (current_error_idx < 0)
current_error_idx = 0;
let error = ERROR_INFOS[current_error_idx];
error.scrollIntoView({behavior: "smooth", block: "center", inline: "start"});
}
function next_error(){
// 查找错误必须是详细模式
if (FOLDER_ALL_CASES)
toggle_folder_all_cases()
current_error_idx += 1;
if (current_error_idx > ERROR_INFOS.length - 1)
current_error_idx = ERROR_INFOS.length - 1;
let error = ERROR_INFOS[current_error_idx];
error.scrollIntoView({behavior: "smooth", block: "center", inline: "start"});
}
</script>
</head>
<body>
<div class="modal" id="imageModal">
<div>
<img class="modal-content" id="img01">
<span class="close">关闭</span>
</div>
</div>
<div class="main_section">
<h1 style="font-family: auto">会议预约测试报告</h1>
<h3>统计结果</h3>
<div class="result">
<table class="result_table">
<tbody>
<tr>
<td>hytest 版本</td>
<td>0.8.12</td>
</tr>
<tr>
<td>开始时间</td>
<td>2025/03/21 17:23:09</td>
</tr>
<tr>
<td>结束时间</td>
<td>2025/03/21 17:23:28</td>
</tr>
<tr>
<td>耗时</td>
<td>19.511 秒</td>
</tr>
<tr>
<td>预备执行用例数量</td>
<td>1</td>
</tr>
<tr>
<td>实际执用例行数量</td>
<td>1</td>
</tr>
<tr>
<td>通过</td>
<td>0</td>
</tr>
<tr>
<td>失败</td>
<td style="">0</td>
</tr>
<tr>
<td>异常</td>
<td style="color:red">1</td>
</tr>
<tr>
<td>阻塞</td>
<td style="">0</td>
</tr>
<tr>
<td>套件初始化失败</td>
<td style="">0</td>
</tr>
<tr>
<td>套件清除 失败</td>
<td style="">0</td>
</tr>
<tr>
<td>用例初始化失败</td>
<td style="">0</td>
</tr>
<tr>
<td>用例清除 失败</td>
<td style="">0</td>
</tr>
</tbody>
</table>
<div class="result_barchart">
<div class="barchar_item">
<span>用例通过 0% : 0 个</span>
<div class="barchart_barbox">
<div class="barchart_bar" style="width: 0.0%; background-color: #04AA6D;"></div>
</div>
</div>
<div class="barchar_item">
<span>用例失败 0% : 0 个</span>
<div class="barchart_barbox">
<div class="barchart_bar" style="width: 0.0%; background-color: #bb4069;"></div>
</div>
</div>
<div class="barchar_item">
<span>用例异常 100% : 1 个</span>
<div class="barchart_barbox">
<div class="barchart_bar" style="width: 100.0%; background-color: #9c27b0;"></div>
</div>
</div>
<div class="barchar_item">
<span>用例阻塞 0% : 0 个</span>
<div class="barchart_barbox">
<div class="barchart_bar" style="width: 0.0%; background-color: #dcbdbd;"></div>
</div>
</div>
</div>
</div>
<div style="margin-top:2em">
<h3 style="display:inline">执行日志</h3>
</div>
<div class="exec_log">
<div class="suite_dir" id="suite_dir cases\主流程功能\">
<div>
<span class="label">进入目录</span>
<span>cases\主流程功能\</span>
</div>
<div class="suite_setup setup" id="suite_setup setup cases\主流程功能\">
<div class="folder_header">
<span class="label">套件初始化</span>
<span>cases\主流程功能\</span>
<span class="executetime">2025-03-21 17:23:09</span>
</div>
<div class="folder_body">
<div class="case_step">
<span class="tag">步骤 #1</span>
<span>初始化浏览器</span>
</div>
<div class="info">'----------' 正在初始化浏览器 '----------'</div>
<div class="info">'----------' 浏览器初始化完成 '----------'</div>
<div class="case_step">
<span class="tag">步骤 #2</span>
<span>登录系统</span>
</div>
</div>
</div>
</div>
<div class="suite_file" id="suite_file cases\主流程功能\04调试创建会议.py">
<div>
<span class="label">进入文件</span>
<span>cases\主流程功能\04调试创建会议.py</span>
</div>
<div class="case abort" id="case_00000001">
<div class="folder_header">
<span class="label caselabel">用例 ABORT</span>
<span class="casename">Unified_Platform_0001</span>
<span class="executetime">2025-03-21 17:23:20</span>
</div>
<div class="folder_body">
<span class="case_class_path">cases\主流程功能\04调试创建会议.py::Unified_Platform_0001</span>
<div class="test_steps" id="test_steps Unified_Platform_0001">
<span class="label">测试步骤</span>
<div class="info error-info">Message: no such window: target window already closed
from unknown error: web view not found
(Session info: chrome=131.0.6778.264)
Stacktrace:
GetHandleVerifier [0x010AFD53+23747]
(No symbol) [0x01037D54]
(No symbol) [0x00F0BE53]
(No symbol) [0x00EED91B]
(No symbol) [0x00F77EFF]
(No symbol) [0x00F8AD49]
(No symbol) [0x00F71B96]
(No symbol) [0x00F43F3C]
(No symbol) [0x00F44EBD]
GetHandleVerifier [0x0138AC73+3017699]
GetHandleVerifier [0x0139B93B+3086507]
GetHandleVerifier [0x013940F2+3055714]
GetHandleVerifier [0x01145AF0+637536]
(No symbol) [0x01040A5D]
(No symbol) [0x0103DA28]
(No symbol) [0x0103DBC5]
(No symbol) [0x010307F0]
BaseThreadInitThunk [0x765E7BA9+25]
RtlInitializeExceptionChain [0x77B6C28B+107]
RtlClearBits [0x77B6C20F+191]
Traceback:
File &quot;D:\GithubData\自动化\ubains-module-test\统一平台\cases\主流程功能\04调试创建会议.py&quot;, line 27, in teststeps
safe_click((By.XPATH, &quot;//p[contains(text(),'新建会议')]&quot;), wd)
File &quot;D:\GithubData\自动化\ubains-module-test\统一平台\base\bases.py&quot;, line 239, in safe_click
element = WebDriverWait(wd, 5).until(EC.visibility_of_element_located(element_locator))
File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\support\wait.py&quot;, line 96, in until
value = method(self._driver)
File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\support\expected_conditions.py&quot;, line 156, in _predicate
return _element_if_visible(driver.find_element(*locator))
File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py&quot;, line 770, in find_element
return self.execute(Command.FIND_ELEMENT, {&quot;using&quot;: by, &quot;value&quot;: value})[&quot;value&quot;]
File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py&quot;, line 384, in execute
self.error_handler.check_response(response)
File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\errorhandler.py&quot;, line 232, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchWindowException: Message: no such window: target window already closed
from unknown error: web view not found
(Session info: chrome=131.0.6778.264)
Stacktrace:
GetHandleVerifier [0x010AFD53+23747]
(No symbol) [0x01037D54]
(No symbol) [0x00F0BE53]
(No symbol) [0x00EED91B]
(No symbol) [0x00F77EFF]
(No symbol) [0x00F8AD49]
(No symbol) [0x00F71B96]
(No symbol) [0x00F43F3C]
(No symbol) [0x00F44EBD]
GetHandleVerifier [0x0138AC73+3017699]
GetHandleVerifier [0x0139B93B+3086507]
GetHandleVerifier [0x013940F2+3055714]
GetHandleVerifier [0x01145AF0+637536]
(No symbol) [0x01040A5D]
(No symbol) [0x0103DA28]
(No symbol) [0x0103DBC5]
(No symbol) [0x010307F0]
BaseThreadInitThunk [0x765E7BA9+25]
RtlInitializeExceptionChain [0x77B6C28B+107]
RtlClearBits [0x77B6C20F+191]
</div>
</div>
</div>
</div>
<div class="suite_teardown teardown" id="suite_teardown teardown cases\主流程功能\">
<div class="folder_header">
<span class="label">套件清除</span>
<span>cases\主流程功能\</span>
<span class="executetime">2025-03-21 17:23:26</span>
</div>
<div class="folder_body">
<div class="info">清除浏览器</div>
</div>
</div>
</div>
</div>
</div>
<div id="float_menu">
<div class="menu-item" onclick="document.querySelector(&quot;body&quot;).scrollIntoView()">页首</div>
<div class="menu-item" onclick="window.open(&quot;http://www.byhy.net/tut/auto/hytest/01&quot;, &quot;_blank&quot;); ">帮助</div>
<div class="menu-item" id="display_mode" onclick="toggle_folder_all_cases()">Summary</div>
<div class="error_jumper" display="block">
<div class="menu-item" onclick="previous_error()" title="上一个错误"></div>
<div class="menu-item" onclick="next_error()" title="下一个错误"></div>
</div>
</div>
</body>
</html>
\ No newline at end of file
=== [ 收集测试用例 ] ===
== cases\主流程功能\__st__.py
=== [ 收集测试用例 ] ===
== cases\主流程功能\__st__.py
== cases\主流程功能\01创建本地会议.py
** no cases in this file , skip it.
== cases\主流程功能\02创建视讯会议.py
** no cases in this file , skip it.
== cases\主流程功能\04调试创建会议.py
== cases\主流程功能\05会议控制.py
** no cases in this file , skip it.
=== [ 执行测试用例 ] ===
预备执行用例数量 : 1
========= 测试开始 : 20250321_172309 =========
>>> cases\主流程功能\
[ suite setup ] cases\主流程功能\
-- 第 1 步 -- 初始化浏览器
'----------' 正在初始化浏览器 '----------'
'----------' 浏览器初始化完成 '----------'
-- 第 2 步 -- 登录系统
>>> cases\主流程功能\04调试创建会议.py
* Unified_Platform_0001 - 2025-03-21 17:23:20
[ case execution steps ]
ABORT Message: no such window: target window already closed
from unknown error: web view not found
(Session info: chrome=131.0.6778.264)
Stacktrace:
GetHandleVerifier [0x010AFD53+23747]
(No symbol) [0x01037D54]
(No symbol) [0x00F0BE53]
(No symbol) [0x00EED91B]
(No symbol) [0x00F77EFF]
(No symbol) [0x00F8AD49]
(No symbol) [0x00F71B96]
(No symbol) [0x00F43F3C]
(No symbol) [0x00F44EBD]
GetHandleVerifier [0x0138AC73+3017699]
GetHandleVerifier [0x0139B93B+3086507]
GetHandleVerifier [0x013940F2+3055714]
GetHandleVerifier [0x01145AF0+637536]
(No symbol) [0x01040A5D]
(No symbol) [0x0103DA28]
(No symbol) [0x0103DBC5]
(No symbol) [0x010307F0]
BaseThreadInitThunk [0x765E7BA9+25]
RtlInitializeExceptionChain [0x77B6C28B+107]
RtlClearBits [0x77B6C20F+191]
Traceback:
File "D:\GithubData\自动化\ubains-module-test\统一平台\cases\主流程功能\04调试创建会议.py", line 27, in teststeps
safe_click((By.XPATH, "//p[contains(text(),'新建会议')]"), wd)
File "D:\GithubData\自动化\ubains-module-test\统一平台\base\bases.py", line 239, in safe_click
element = WebDriverWait(wd, 5).until(EC.visibility_of_element_located(element_locator))
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\support\wait.py", line 96, in until
value = method(self._driver)
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\support\expected_conditions.py", line 156, in _predicate
return _element_if_visible(driver.find_element(*locator))
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 770, in find_element
return self.execute(Command.FIND_ELEMENT, {"using": by, "value": value})["value"]
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 384, in execute
self.error_handler.check_response(response)
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 232, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchWindowException: Message: no such window: target window already closed
from unknown error: web view not found
(Session info: chrome=131.0.6778.264)
Stacktrace:
GetHandleVerifier [0x010AFD53+23747]
(No symbol) [0x01037D54]
(No symbol) [0x00F0BE53]
(No symbol) [0x00EED91B]
(No symbol) [0x00F77EFF]
(No symbol) [0x00F8AD49]
(No symbol) [0x00F71B96]
(No symbol) [0x00F43F3C]
(No symbol) [0x00F44EBD]
GetHandleVerifier [0x0138AC73+3017699]
GetHandleVerifier [0x0139B93B+3086507]
GetHandleVerifier [0x013940F2+3055714]
GetHandleVerifier [0x01145AF0+637536]
(No symbol) [0x01040A5D]
(No symbol) [0x0103DA28]
(No symbol) [0x0103DBC5]
(No symbol) [0x010307F0]
BaseThreadInitThunk [0x765E7BA9+25]
RtlInitializeExceptionChain [0x77B6C28B+107]
RtlClearBits [0x77B6C20F+191]
[ suite teardown ] cases\主流程功能\
清除浏览器
========= 测试结束 : 20250321_172328 =========
耗时 : 19.511 秒
预备执行用例数量 : 1
实际执行用例数量 : 1
通过 : 0
失败 : 0
异常 : 1
套件初始化失败 : 0
套件清除 失败 : 0
用例初始化失败 : 0
用例清除 失败 : 0
=== [ 收集测试用例 ] ===
== cases\主流程功能\__st__.py
== cases\主流程功能\01创建本地会议.py
** no cases in this file , skip it.
== cases\主流程功能\02创建视讯会议.py
** no cases in this file , skip it.
== cases\主流程功能\04调试创建会议.py
== cases\主流程功能\05会议控制.py
** no cases in this file , skip it.
=== [ 执行测试用例 ] ===
预备执行用例数量 : 1
========= 测试开始 : 20250321_172006 =========
>>> cases\主流程功能\
[ suite setup ] cases\主流程功能\
-- 第 1 步 -- 初始化浏览器
'----------' 正在初始化浏览器 '----------'
'----------' 浏览器初始化完成 '----------'
-- 第 2 步 -- 登录系统
>>> cases\主流程功能\04调试创建会议.py
* Unified_Platform_0001 - 2025-03-21 17:20:14
[ case execution steps ]
PASS
[ suite teardown ] cases\主流程功能\
清除浏览器
========= 测试结束 : 20250321_172028 =========
耗时 : 22.699 秒
预备执行用例数量 : 1
实际执行用例数量 : 1
通过 : 1
失败 : 0
异常 : 0
套件初始化失败 : 0
套件清除 失败 : 0
用例初始化失败 : 0
用例清除 失败 : 0
<!DOCTYPE html>
<html>
<head>
<title>会议预约测试报告</title>
<meta charset="UTF-8">
<style>body {
font-family: consolas, Verdana, sans-serif;
font-size: 1.2em;
color: #696e71;
display: grid;
grid-template-columns: 1fr 5rem;
}
.main_section {
width: 90%;
margin: 0 auto;
}
#float_menu{
position:fixed;
top:0;
right:0;
text-align: center;
}
#float_menu .menu-item {
cursor: pointer;
padding: .5em;
margin: .5em 0;
color: #c08580;
background-color: #f8f0ef;
font-size: 1.2em;
}
.result{
display: flex;
}
.result_table{
border-collapse: collapse;
border: 1px solid #f0e0e5;
width: 30em;
text-align: center;
font-size: 1.0em;
}
.result_table td{
border: 1px solid #f0e0e5;
padding: .3em;
}
.result_barchart{
width: 30em;
margin: 0 5em 0 5em;
}
.barchar_item{
margin: 2.5rem 0;
}
.barchart_barbox {
margin: 0.5em 0;
width: 100%;
background-color: #fff;
border: 1px solid #86c2dd;
border-radius: .2em;
}
.barchart_bar {
text-align: right;
height: 1.2rem;
}
.h3_button {
margin: 1.5em;
cursor: pointer;
color: #03a9f4;
}
.info
{
white-space:pre-wrap;
margin: .8em 1.5em;
}
.error-info
{
color: #a64747
}
.suite_dir {
margin: 1em .2em;
padding: .3em;
/* background-color: #dfeff6; */
border: 1px solid #bcd8e4;
}
.suite_file {
margin: 1em .2em;
padding: .3em;
border: 1px solid #bcd8e4;
}
.case {
margin: 1em .2em;
/* padding: .3em; */
border: 1px solid #e7d4d4;
}
.case_class_path{
margin: 0em 1em;
}
.folder_header {
padding: .2em .7em;
background-color: #fffaf9;
cursor: pointer;
}
.setup{
margin: .2em;
/* padding: .3em; */
/* border: 1px solid #e7d4d4; */
}
.teardown{
margin: .2em;
/* padding: .3em;*/
/* border: 1px solid #e7d4d4; */
}
.test_steps{
margin: .2em;
padding: .3em;
/* border: 1px solid #e7d4d4; */
}
.label {
display: inline-block;
padding: .1em .5em;
font-size: .88em;
letter-spacing: 1px;
white-space: nowrap;
color: #0d6ebc;
border-radius: .2em;
min-width: 5em;
margin-right: 2em;
font-family: consolas;
}
/* .suite_setup .label{
color: #219e26 ;
}
.suite_teardown .label{
color: #219e26;
} */
/* .case.pass .casename{
color: #329132 ;
} */
.case.pass .caselabel{
color: white;
background-color: #3b9e3f;
}
/* .case.fail .casename{
color: #a64747;
} */
.case.fail .caselabel{
color: white;
background-color: #a64747;
}
/* .case.abort .casename{
color: #953ab7;
} */
.case.abort .caselabel{
color: white;
background-color: #9c27b0;
}
.case_step {
margin: .8em;
}
.checkpoint_pass {
margin: .8em;
}
.checkpoint_fail {
margin: .8em;
}
.case_step .tag{
color: #2196f3;;
margin: .3em 1em .3em 0;
padding: .1em .3em;
font-size: .92em;
}
.checkpoint_pass .tag{
color: #009806;
margin:.3em 1em .3em .5em;
padding: .1em .3em;
font-size: .92em;
}
.checkpoint_fail .tag{
color: #9c2020;
margin:.3em 1em .3em .5em;
padding: .1em .3em;
font-size: .92em;
}
.screenshot {
border: 1px solid #86c2dd;
}
.executetime {
float: right;
}
/* 模态框内容 */
.modal-content {
margin: auto;
display: block;
width: 95%;
max-width: 700px;
max-height: 80vh; /* 设置最大高度为视口高度的80% */
object-fit: contain; /* 保持图片的宽高比 */
zoom: 3;
}
/* 模态框 */
.modal {
display: none; /* 隐藏 */
position: fixed; /* 固定位置 */
z-index: 1; /* 坐在顶部 */
padding-top: 40px; /* 在图片上方添加一些内边距 */
left: 0;
top: 0;
width: 100%; /* 宽度 */
height: 100%; /* 高度 */
overflow: auto; /* 启用滚动 */
background-color: rgb(0,0,0); /* 背景颜色 */
background-color: rgba(0,0,0,0.9); /* 黑色背景半透明 */
}
/* 关闭按钮 */
.close {
position: absolute; /* 定义元素的定位方式为绝对定位 */
top: 10px; /* 距离最近的已定位祖先元素顶部15像素 */
right: 30px; /* 距离最近的已定位祖先元素右侧35像素 */
color: #f1f1f1; /* 文本颜色为浅灰色 */
font-size: 15px; /* 字体大小为40像素 */
font-weight: bold; /* 字体加粗 */
transition: 0.3s; /* 过渡效果,0.3秒内完成 */
}
.close:hover,
.close:focus {
color: #bbb;
text-decoration: none;
cursor: pointer;
}
</style>
<script type="text/javascript">var FOLDER_ALL_CASES = false; // 是否为精简模式的标记
var ERROR_INFOS = []; // 错误信息列表
var current_error_idx = -1;
// 页面加载后执行的函数
window.addEventListener("load", function(){
// 所有 .folder_header 添加点击事件处理
let folderHeaderEles = document.querySelectorAll(".folder_header");
folderHeaderEles.forEach(function(ele) {
ele.addEventListener("click", function(event) {
let fb = event.target.closest('.folder_header').nextElementSibling;
fb.style.display = fb.style.display === 'none' ? 'block' : 'none';
});
});
// 找到所有的错误信息对象
ERROR_INFOS = document.querySelectorAll(".error-info");
// 获取所有图片元素
let images = document.querySelectorAll('.modal-image');
// 获取模态框元素
let modal = document.getElementById("imageModal");
// 获取模态框中的图片元素
let modalImg = document.getElementById("img01");
// 获取关闭按钮元素
let span = document.getElementsByClassName("close")[0];
// 为每个图片添加点击事件监听器
images.forEach(function(img) {
img.addEventListener("click", function() {
modal.style.display = "block"; // 显示模态框
modalImg.src = this.src; // 设置模态框中的图片为点击的图片
});
});
// 当点击关闭按钮时,隐藏模态框
span.onclick = function() {
modal.style.display = "none";
};
// 当点击模态框外区域时,隐藏模态框
window.onclick = function(event) {
if (event.target == modal) {
modal.style.display = "none";
}
};
});
function toggle_folder_all_cases(){
let eles = document.querySelectorAll(".folder_body");
FOLDER_ALL_CASES = !FOLDER_ALL_CASES;
document.getElementById('display_mode').innerHTML = FOLDER_ALL_CASES ? "Detail" : "Summary";
for (const ele of eles){
ele.style.display = FOLDER_ALL_CASES ? "none" : "block";
}
}
function previous_error(){
// 查找错误必须是详细模式
if (FOLDER_ALL_CASES)
toggle_folder_all_cases()
current_error_idx -= 1;
if (current_error_idx < 0)
current_error_idx = 0;
let error = ERROR_INFOS[current_error_idx];
error.scrollIntoView({behavior: "smooth", block: "center", inline: "start"});
}
function next_error(){
// 查找错误必须是详细模式
if (FOLDER_ALL_CASES)
toggle_folder_all_cases()
current_error_idx += 1;
if (current_error_idx > ERROR_INFOS.length - 1)
current_error_idx = ERROR_INFOS.length - 1;
let error = ERROR_INFOS[current_error_idx];
error.scrollIntoView({behavior: "smooth", block: "center", inline: "start"});
}
</script>
</head>
<body>
<div class="modal" id="imageModal">
<div>
<img class="modal-content" id="img01">
<span class="close">关闭</span>
</div>
</div>
<div class="main_section">
<h1 style="font-family: auto">会议预约测试报告</h1>
<h3>统计结果</h3>
<div class="result">
<table class="result_table">
<tbody>
<tr>
<td>hytest 版本</td>
<td>0.8.12</td>
</tr>
<tr>
<td>开始时间</td>
<td>2025/03/21 17:18:58</td>
</tr>
<tr>
<td>结束时间</td>
<td>2025/03/21 17:19:49</td>
</tr>
<tr>
<td>耗时</td>
<td>50.609 秒</td>
</tr>
<tr>
<td>预备执行用例数量</td>
<td>1</td>
</tr>
<tr>
<td>实际执用例行数量</td>
<td>1</td>
</tr>
<tr>
<td>通过</td>
<td>1</td>
</tr>
<tr>
<td>失败</td>
<td style="">0</td>
</tr>
<tr>
<td>异常</td>
<td style="">0</td>
</tr>
<tr>
<td>阻塞</td>
<td style="">0</td>
</tr>
<tr>
<td>套件初始化失败</td>
<td style="">0</td>
</tr>
<tr>
<td>套件清除 失败</td>
<td style="">0</td>
</tr>
<tr>
<td>用例初始化失败</td>
<td style="">0</td>
</tr>
<tr>
<td>用例清除 失败</td>
<td style="">0</td>
</tr>
</tbody>
</table>
<div class="result_barchart">
<div class="barchar_item">
<span>用例通过 100% : 1 个</span>
<div class="barchart_barbox">
<div class="barchart_bar" style="width: 100.0%; background-color: #04AA6D;"></div>
</div>
</div>
<div class="barchar_item">
<span>用例失败 0% : 0 个</span>
<div class="barchart_barbox">
<div class="barchart_bar" style="width: 0.0%; background-color: #bb4069;"></div>
</div>
</div>
<div class="barchar_item">
<span>用例异常 0% : 0 个</span>
<div class="barchart_barbox">
<div class="barchart_bar" style="width: 0.0%; background-color: #9c27b0;"></div>
</div>
</div>
<div class="barchar_item">
<span>用例阻塞 0% : 0 个</span>
<div class="barchart_barbox">
<div class="barchart_bar" style="width: 0.0%; background-color: #dcbdbd;"></div>
</div>
</div>
</div>
</div>
<div style="margin-top:2em">
<h3 style="display:inline">执行日志</h3>
</div>
<div class="exec_log">
<div class="suite_dir" id="suite_dir cases\主流程功能\">
<div>
<span class="label">进入目录</span>
<span>cases\主流程功能\</span>
</div>
<div class="suite_setup setup" id="suite_setup setup cases\主流程功能\">
<div class="folder_header">
<span class="label">套件初始化</span>
<span>cases\主流程功能\</span>
<span class="executetime">2025-03-21 17:18:58</span>
</div>
<div class="folder_body">
<div class="case_step">
<span class="tag">步骤 #1</span>
<span>初始化浏览器</span>
</div>
<div class="info">'----------' 正在初始化浏览器 '----------'</div>
<div class="info">'----------' 浏览器初始化完成 '----------'</div>
<div class="case_step">
<span class="tag">步骤 #2</span>
<span>登录系统</span>
</div>
</div>
</div>
</div>
<div class="suite_file" id="suite_file cases\主流程功能\04调试创建会议.py">
<div>
<span class="label">进入文件</span>
<span>cases\主流程功能\04调试创建会议.py</span>
</div>
<div class="case pass" id="case_00000001">
<div class="folder_header">
<span class="label caselabel">用例 PASS</span>
<span class="casename">Unified_Platform_0001</span>
<span class="executetime">2025-03-21 17:19:31</span>
</div>
<div class="folder_body">
<span class="case_class_path">cases\主流程功能\04调试创建会议.py::Unified_Platform_0001</span>
<div class="test_steps" id="test_steps Unified_Platform_0001">
<span class="label">测试步骤</span>
</div>
</div>
</div>
<div class="suite_teardown teardown" id="suite_teardown teardown cases\主流程功能\">
<div class="folder_header">
<span class="label">套件清除</span>
<span>cases\主流程功能\</span>
<span class="executetime">2025-03-21 17:19:46</span>
</div>
<div class="folder_body">
<div class="info">清除浏览器</div>
</div>
</div>
</div>
</div>
</div>
<div id="float_menu">
<div class="menu-item" onclick="document.querySelector(&quot;body&quot;).scrollIntoView()">页首</div>
<div class="menu-item" onclick="window.open(&quot;http://www.byhy.net/tut/auto/hytest/01&quot;, &quot;_blank&quot;); ">帮助</div>
<div class="menu-item" id="display_mode" onclick="toggle_folder_all_cases()">Summary</div>
<div class="error_jumper" display="none">
<div class="menu-item" onclick="previous_error()" title="上一个错误"></div>
<div class="menu-item" onclick="next_error()" title="下一个错误"></div>
</div>
</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>会议预约测试报告</title>
<meta charset="UTF-8">
<style>body {
font-family: consolas, Verdana, sans-serif;
font-size: 1.2em;
color: #696e71;
display: grid;
grid-template-columns: 1fr 5rem;
}
.main_section {
width: 90%;
margin: 0 auto;
}
#float_menu{
position:fixed;
top:0;
right:0;
text-align: center;
}
#float_menu .menu-item {
cursor: pointer;
padding: .5em;
margin: .5em 0;
color: #c08580;
background-color: #f8f0ef;
font-size: 1.2em;
}
.result{
display: flex;
}
.result_table{
border-collapse: collapse;
border: 1px solid #f0e0e5;
width: 30em;
text-align: center;
font-size: 1.0em;
}
.result_table td{
border: 1px solid #f0e0e5;
padding: .3em;
}
.result_barchart{
width: 30em;
margin: 0 5em 0 5em;
}
.barchar_item{
margin: 2.5rem 0;
}
.barchart_barbox {
margin: 0.5em 0;
width: 100%;
background-color: #fff;
border: 1px solid #86c2dd;
border-radius: .2em;
}
.barchart_bar {
text-align: right;
height: 1.2rem;
}
.h3_button {
margin: 1.5em;
cursor: pointer;
color: #03a9f4;
}
.info
{
white-space:pre-wrap;
margin: .8em 1.5em;
}
.error-info
{
color: #a64747
}
.suite_dir {
margin: 1em .2em;
padding: .3em;
/* background-color: #dfeff6; */
border: 1px solid #bcd8e4;
}
.suite_file {
margin: 1em .2em;
padding: .3em;
border: 1px solid #bcd8e4;
}
.case {
margin: 1em .2em;
/* padding: .3em; */
border: 1px solid #e7d4d4;
}
.case_class_path{
margin: 0em 1em;
}
.folder_header {
padding: .2em .7em;
background-color: #fffaf9;
cursor: pointer;
}
.setup{
margin: .2em;
/* padding: .3em; */
/* border: 1px solid #e7d4d4; */
}
.teardown{
margin: .2em;
/* padding: .3em;*/
/* border: 1px solid #e7d4d4; */
}
.test_steps{
margin: .2em;
padding: .3em;
/* border: 1px solid #e7d4d4; */
}
.label {
display: inline-block;
padding: .1em .5em;
font-size: .88em;
letter-spacing: 1px;
white-space: nowrap;
color: #0d6ebc;
border-radius: .2em;
min-width: 5em;
margin-right: 2em;
font-family: consolas;
}
/* .suite_setup .label{
color: #219e26 ;
}
.suite_teardown .label{
color: #219e26;
} */
/* .case.pass .casename{
color: #329132 ;
} */
.case.pass .caselabel{
color: white;
background-color: #3b9e3f;
}
/* .case.fail .casename{
color: #a64747;
} */
.case.fail .caselabel{
color: white;
background-color: #a64747;
}
/* .case.abort .casename{
color: #953ab7;
} */
.case.abort .caselabel{
color: white;
background-color: #9c27b0;
}
.case_step {
margin: .8em;
}
.checkpoint_pass {
margin: .8em;
}
.checkpoint_fail {
margin: .8em;
}
.case_step .tag{
color: #2196f3;;
margin: .3em 1em .3em 0;
padding: .1em .3em;
font-size: .92em;
}
.checkpoint_pass .tag{
color: #009806;
margin:.3em 1em .3em .5em;
padding: .1em .3em;
font-size: .92em;
}
.checkpoint_fail .tag{
color: #9c2020;
margin:.3em 1em .3em .5em;
padding: .1em .3em;
font-size: .92em;
}
.screenshot {
border: 1px solid #86c2dd;
}
.executetime {
float: right;
}
/* 模态框内容 */
.modal-content {
margin: auto;
display: block;
width: 95%;
max-width: 700px;
max-height: 80vh; /* 设置最大高度为视口高度的80% */
object-fit: contain; /* 保持图片的宽高比 */
zoom: 3;
}
/* 模态框 */
.modal {
display: none; /* 隐藏 */
position: fixed; /* 固定位置 */
z-index: 1; /* 坐在顶部 */
padding-top: 40px; /* 在图片上方添加一些内边距 */
left: 0;
top: 0;
width: 100%; /* 宽度 */
height: 100%; /* 高度 */
overflow: auto; /* 启用滚动 */
background-color: rgb(0,0,0); /* 背景颜色 */
background-color: rgba(0,0,0,0.9); /* 黑色背景半透明 */
}
/* 关闭按钮 */
.close {
position: absolute; /* 定义元素的定位方式为绝对定位 */
top: 10px; /* 距离最近的已定位祖先元素顶部15像素 */
right: 30px; /* 距离最近的已定位祖先元素右侧35像素 */
color: #f1f1f1; /* 文本颜色为浅灰色 */
font-size: 15px; /* 字体大小为40像素 */
font-weight: bold; /* 字体加粗 */
transition: 0.3s; /* 过渡效果,0.3秒内完成 */
}
.close:hover,
.close:focus {
color: #bbb;
text-decoration: none;
cursor: pointer;
}
</style>
<script type="text/javascript">var FOLDER_ALL_CASES = false; // 是否为精简模式的标记
var ERROR_INFOS = []; // 错误信息列表
var current_error_idx = -1;
// 页面加载后执行的函数
window.addEventListener("load", function(){
// 所有 .folder_header 添加点击事件处理
let folderHeaderEles = document.querySelectorAll(".folder_header");
folderHeaderEles.forEach(function(ele) {
ele.addEventListener("click", function(event) {
let fb = event.target.closest('.folder_header').nextElementSibling;
fb.style.display = fb.style.display === 'none' ? 'block' : 'none';
});
});
// 找到所有的错误信息对象
ERROR_INFOS = document.querySelectorAll(".error-info");
// 获取所有图片元素
let images = document.querySelectorAll('.modal-image');
// 获取模态框元素
let modal = document.getElementById("imageModal");
// 获取模态框中的图片元素
let modalImg = document.getElementById("img01");
// 获取关闭按钮元素
let span = document.getElementsByClassName("close")[0];
// 为每个图片添加点击事件监听器
images.forEach(function(img) {
img.addEventListener("click", function() {
modal.style.display = "block"; // 显示模态框
modalImg.src = this.src; // 设置模态框中的图片为点击的图片
});
});
// 当点击关闭按钮时,隐藏模态框
span.onclick = function() {
modal.style.display = "none";
};
// 当点击模态框外区域时,隐藏模态框
window.onclick = function(event) {
if (event.target == modal) {
modal.style.display = "none";
}
};
});
function toggle_folder_all_cases(){
let eles = document.querySelectorAll(".folder_body");
FOLDER_ALL_CASES = !FOLDER_ALL_CASES;
document.getElementById('display_mode').innerHTML = FOLDER_ALL_CASES ? "Detail" : "Summary";
for (const ele of eles){
ele.style.display = FOLDER_ALL_CASES ? "none" : "block";
}
}
function previous_error(){
// 查找错误必须是详细模式
if (FOLDER_ALL_CASES)
toggle_folder_all_cases()
current_error_idx -= 1;
if (current_error_idx < 0)
current_error_idx = 0;
let error = ERROR_INFOS[current_error_idx];
error.scrollIntoView({behavior: "smooth", block: "center", inline: "start"});
}
function next_error(){
// 查找错误必须是详细模式
if (FOLDER_ALL_CASES)
toggle_folder_all_cases()
current_error_idx += 1;
if (current_error_idx > ERROR_INFOS.length - 1)
current_error_idx = ERROR_INFOS.length - 1;
let error = ERROR_INFOS[current_error_idx];
error.scrollIntoView({behavior: "smooth", block: "center", inline: "start"});
}
</script>
</head>
<body>
<div class="modal" id="imageModal">
<div>
<img class="modal-content" id="img01">
<span class="close">关闭</span>
</div>
</div>
<div class="main_section">
<h1 style="font-family: auto">会议预约测试报告</h1>
<h3>统计结果</h3>
<div class="result">
<table class="result_table">
<tbody>
<tr>
<td>hytest 版本</td>
<td>0.8.12</td>
</tr>
<tr>
<td>开始时间</td>
<td>2025/03/21 17:20:06</td>
</tr>
<tr>
<td>结束时间</td>
<td>2025/03/21 17:20:28</td>
</tr>
<tr>
<td>耗时</td>
<td>22.699 秒</td>
</tr>
<tr>
<td>预备执行用例数量</td>
<td>1</td>
</tr>
<tr>
<td>实际执用例行数量</td>
<td>1</td>
</tr>
<tr>
<td>通过</td>
<td>1</td>
</tr>
<tr>
<td>失败</td>
<td style="">0</td>
</tr>
<tr>
<td>异常</td>
<td style="">0</td>
</tr>
<tr>
<td>阻塞</td>
<td style="">0</td>
</tr>
<tr>
<td>套件初始化失败</td>
<td style="">0</td>
</tr>
<tr>
<td>套件清除 失败</td>
<td style="">0</td>
</tr>
<tr>
<td>用例初始化失败</td>
<td style="">0</td>
</tr>
<tr>
<td>用例清除 失败</td>
<td style="">0</td>
</tr>
</tbody>
</table>
<div class="result_barchart">
<div class="barchar_item">
<span>用例通过 100% : 1 个</span>
<div class="barchart_barbox">
<div class="barchart_bar" style="width: 100.0%; background-color: #04AA6D;"></div>
</div>
</div>
<div class="barchar_item">
<span>用例失败 0% : 0 个</span>
<div class="barchart_barbox">
<div class="barchart_bar" style="width: 0.0%; background-color: #bb4069;"></div>
</div>
</div>
<div class="barchar_item">
<span>用例异常 0% : 0 个</span>
<div class="barchart_barbox">
<div class="barchart_bar" style="width: 0.0%; background-color: #9c27b0;"></div>
</div>
</div>
<div class="barchar_item">
<span>用例阻塞 0% : 0 个</span>
<div class="barchart_barbox">
<div class="barchart_bar" style="width: 0.0%; background-color: #dcbdbd;"></div>
</div>
</div>
</div>
</div>
<div style="margin-top:2em">
<h3 style="display:inline">执行日志</h3>
</div>
<div class="exec_log">
<div class="suite_dir" id="suite_dir cases\主流程功能\">
<div>
<span class="label">进入目录</span>
<span>cases\主流程功能\</span>
</div>
<div class="suite_setup setup" id="suite_setup setup cases\主流程功能\">
<div class="folder_header">
<span class="label">套件初始化</span>
<span>cases\主流程功能\</span>
<span class="executetime">2025-03-21 17:20:06</span>
</div>
<div class="folder_body">
<div class="case_step">
<span class="tag">步骤 #1</span>
<span>初始化浏览器</span>
</div>
<div class="info">'----------' 正在初始化浏览器 '----------'</div>
<div class="info">'----------' 浏览器初始化完成 '----------'</div>
<div class="case_step">
<span class="tag">步骤 #2</span>
<span>登录系统</span>
</div>
</div>
</div>
</div>
<div class="suite_file" id="suite_file cases\主流程功能\04调试创建会议.py">
<div>
<span class="label">进入文件</span>
<span>cases\主流程功能\04调试创建会议.py</span>
</div>
<div class="case pass" id="case_00000001">
<div class="folder_header">
<span class="label caselabel">用例 PASS</span>
<span class="casename">Unified_Platform_0001</span>
<span class="executetime">2025-03-21 17:20:14</span>
</div>
<div class="folder_body">
<span class="case_class_path">cases\主流程功能\04调试创建会议.py::Unified_Platform_0001</span>
<div class="test_steps" id="test_steps Unified_Platform_0001">
<span class="label">测试步骤</span>
</div>
</div>
</div>
<div class="suite_teardown teardown" id="suite_teardown teardown cases\主流程功能\">
<div class="folder_header">
<span class="label">套件清除</span>
<span>cases\主流程功能\</span>
<span class="executetime">2025-03-21 17:20:26</span>
</div>
<div class="folder_body">
<div class="info">清除浏览器</div>
</div>
</div>
</div>
</div>
</div>
<div id="float_menu">
<div class="menu-item" onclick="document.querySelector(&quot;body&quot;).scrollIntoView()">页首</div>
<div class="menu-item" onclick="window.open(&quot;http://www.byhy.net/tut/auto/hytest/01&quot;, &quot;_blank&quot;); ">帮助</div>
<div class="menu-item" id="display_mode" onclick="toggle_folder_all_cases()">Summary</div>
<div class="error_jumper" display="none">
<div class="menu-item" onclick="previous_error()" title="上一个错误"></div>
<div class="menu-item" onclick="next_error()" title="下一个错误"></div>
</div>
</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>会议预约测试报告</title>
<meta charset="UTF-8">
<style>body {
font-family: consolas, Verdana, sans-serif;
font-size: 1.2em;
color: #696e71;
display: grid;
grid-template-columns: 1fr 5rem;
}
.main_section {
width: 90%;
margin: 0 auto;
}
#float_menu{
position:fixed;
top:0;
right:0;
text-align: center;
}
#float_menu .menu-item {
cursor: pointer;
padding: .5em;
margin: .5em 0;
color: #c08580;
background-color: #f8f0ef;
font-size: 1.2em;
}
.result{
display: flex;
}
.result_table{
border-collapse: collapse;
border: 1px solid #f0e0e5;
width: 30em;
text-align: center;
font-size: 1.0em;
}
.result_table td{
border: 1px solid #f0e0e5;
padding: .3em;
}
.result_barchart{
width: 30em;
margin: 0 5em 0 5em;
}
.barchar_item{
margin: 2.5rem 0;
}
.barchart_barbox {
margin: 0.5em 0;
width: 100%;
background-color: #fff;
border: 1px solid #86c2dd;
border-radius: .2em;
}
.barchart_bar {
text-align: right;
height: 1.2rem;
}
.h3_button {
margin: 1.5em;
cursor: pointer;
color: #03a9f4;
}
.info
{
white-space:pre-wrap;
margin: .8em 1.5em;
}
.error-info
{
color: #a64747
}
.suite_dir {
margin: 1em .2em;
padding: .3em;
/* background-color: #dfeff6; */
border: 1px solid #bcd8e4;
}
.suite_file {
margin: 1em .2em;
padding: .3em;
border: 1px solid #bcd8e4;
}
.case {
margin: 1em .2em;
/* padding: .3em; */
border: 1px solid #e7d4d4;
}
.case_class_path{
margin: 0em 1em;
}
.folder_header {
padding: .2em .7em;
background-color: #fffaf9;
cursor: pointer;
}
.setup{
margin: .2em;
/* padding: .3em; */
/* border: 1px solid #e7d4d4; */
}
.teardown{
margin: .2em;
/* padding: .3em;*/
/* border: 1px solid #e7d4d4; */
}
.test_steps{
margin: .2em;
padding: .3em;
/* border: 1px solid #e7d4d4; */
}
.label {
display: inline-block;
padding: .1em .5em;
font-size: .88em;
letter-spacing: 1px;
white-space: nowrap;
color: #0d6ebc;
border-radius: .2em;
min-width: 5em;
margin-right: 2em;
font-family: consolas;
}
/* .suite_setup .label{
color: #219e26 ;
}
.suite_teardown .label{
color: #219e26;
} */
/* .case.pass .casename{
color: #329132 ;
} */
.case.pass .caselabel{
color: white;
background-color: #3b9e3f;
}
/* .case.fail .casename{
color: #a64747;
} */
.case.fail .caselabel{
color: white;
background-color: #a64747;
}
/* .case.abort .casename{
color: #953ab7;
} */
.case.abort .caselabel{
color: white;
background-color: #9c27b0;
}
.case_step {
margin: .8em;
}
.checkpoint_pass {
margin: .8em;
}
.checkpoint_fail {
margin: .8em;
}
.case_step .tag{
color: #2196f3;;
margin: .3em 1em .3em 0;
padding: .1em .3em;
font-size: .92em;
}
.checkpoint_pass .tag{
color: #009806;
margin:.3em 1em .3em .5em;
padding: .1em .3em;
font-size: .92em;
}
.checkpoint_fail .tag{
color: #9c2020;
margin:.3em 1em .3em .5em;
padding: .1em .3em;
font-size: .92em;
}
.screenshot {
border: 1px solid #86c2dd;
}
.executetime {
float: right;
}
/* 模态框内容 */
.modal-content {
margin: auto;
display: block;
width: 95%;
max-width: 700px;
max-height: 80vh; /* 设置最大高度为视口高度的80% */
object-fit: contain; /* 保持图片的宽高比 */
zoom: 3;
}
/* 模态框 */
.modal {
display: none; /* 隐藏 */
position: fixed; /* 固定位置 */
z-index: 1; /* 坐在顶部 */
padding-top: 40px; /* 在图片上方添加一些内边距 */
left: 0;
top: 0;
width: 100%; /* 宽度 */
height: 100%; /* 高度 */
overflow: auto; /* 启用滚动 */
background-color: rgb(0,0,0); /* 背景颜色 */
background-color: rgba(0,0,0,0.9); /* 黑色背景半透明 */
}
/* 关闭按钮 */
.close {
position: absolute; /* 定义元素的定位方式为绝对定位 */
top: 10px; /* 距离最近的已定位祖先元素顶部15像素 */
right: 30px; /* 距离最近的已定位祖先元素右侧35像素 */
color: #f1f1f1; /* 文本颜色为浅灰色 */
font-size: 15px; /* 字体大小为40像素 */
font-weight: bold; /* 字体加粗 */
transition: 0.3s; /* 过渡效果,0.3秒内完成 */
}
.close:hover,
.close:focus {
color: #bbb;
text-decoration: none;
cursor: pointer;
}
</style>
<script type="text/javascript">var FOLDER_ALL_CASES = false; // 是否为精简模式的标记
var ERROR_INFOS = []; // 错误信息列表
var current_error_idx = -1;
// 页面加载后执行的函数
window.addEventListener("load", function(){
// 所有 .folder_header 添加点击事件处理
let folderHeaderEles = document.querySelectorAll(".folder_header");
folderHeaderEles.forEach(function(ele) {
ele.addEventListener("click", function(event) {
let fb = event.target.closest('.folder_header').nextElementSibling;
fb.style.display = fb.style.display === 'none' ? 'block' : 'none';
});
});
// 找到所有的错误信息对象
ERROR_INFOS = document.querySelectorAll(".error-info");
// 获取所有图片元素
let images = document.querySelectorAll('.modal-image');
// 获取模态框元素
let modal = document.getElementById("imageModal");
// 获取模态框中的图片元素
let modalImg = document.getElementById("img01");
// 获取关闭按钮元素
let span = document.getElementsByClassName("close")[0];
// 为每个图片添加点击事件监听器
images.forEach(function(img) {
img.addEventListener("click", function() {
modal.style.display = "block"; // 显示模态框
modalImg.src = this.src; // 设置模态框中的图片为点击的图片
});
});
// 当点击关闭按钮时,隐藏模态框
span.onclick = function() {
modal.style.display = "none";
};
// 当点击模态框外区域时,隐藏模态框
window.onclick = function(event) {
if (event.target == modal) {
modal.style.display = "none";
}
};
});
function toggle_folder_all_cases(){
let eles = document.querySelectorAll(".folder_body");
FOLDER_ALL_CASES = !FOLDER_ALL_CASES;
document.getElementById('display_mode').innerHTML = FOLDER_ALL_CASES ? "Detail" : "Summary";
for (const ele of eles){
ele.style.display = FOLDER_ALL_CASES ? "none" : "block";
}
}
function previous_error(){
// 查找错误必须是详细模式
if (FOLDER_ALL_CASES)
toggle_folder_all_cases()
current_error_idx -= 1;
if (current_error_idx < 0)
current_error_idx = 0;
let error = ERROR_INFOS[current_error_idx];
error.scrollIntoView({behavior: "smooth", block: "center", inline: "start"});
}
function next_error(){
// 查找错误必须是详细模式
if (FOLDER_ALL_CASES)
toggle_folder_all_cases()
current_error_idx += 1;
if (current_error_idx > ERROR_INFOS.length - 1)
current_error_idx = ERROR_INFOS.length - 1;
let error = ERROR_INFOS[current_error_idx];
error.scrollIntoView({behavior: "smooth", block: "center", inline: "start"});
}
</script>
</head>
<body>
<div class="modal" id="imageModal">
<div>
<img class="modal-content" id="img01">
<span class="close">关闭</span>
</div>
</div>
<div class="main_section">
<h1 style="font-family: auto">会议预约测试报告</h1>
<h3>统计结果</h3>
<div class="result">
<table class="result_table">
<tbody>
<tr>
<td>hytest 版本</td>
<td>0.8.12</td>
</tr>
<tr>
<td>开始时间</td>
<td>2025/03/21 17:23:09</td>
</tr>
<tr>
<td>结束时间</td>
<td>2025/03/21 17:23:28</td>
</tr>
<tr>
<td>耗时</td>
<td>19.511 秒</td>
</tr>
<tr>
<td>预备执行用例数量</td>
<td>1</td>
</tr>
<tr>
<td>实际执用例行数量</td>
<td>1</td>
</tr>
<tr>
<td>通过</td>
<td>0</td>
</tr>
<tr>
<td>失败</td>
<td style="">0</td>
</tr>
<tr>
<td>异常</td>
<td style="color:red">1</td>
</tr>
<tr>
<td>阻塞</td>
<td style="">0</td>
</tr>
<tr>
<td>套件初始化失败</td>
<td style="">0</td>
</tr>
<tr>
<td>套件清除 失败</td>
<td style="">0</td>
</tr>
<tr>
<td>用例初始化失败</td>
<td style="">0</td>
</tr>
<tr>
<td>用例清除 失败</td>
<td style="">0</td>
</tr>
</tbody>
</table>
<div class="result_barchart">
<div class="barchar_item">
<span>用例通过 0% : 0 个</span>
<div class="barchart_barbox">
<div class="barchart_bar" style="width: 0.0%; background-color: #04AA6D;"></div>
</div>
</div>
<div class="barchar_item">
<span>用例失败 0% : 0 个</span>
<div class="barchart_barbox">
<div class="barchart_bar" style="width: 0.0%; background-color: #bb4069;"></div>
</div>
</div>
<div class="barchar_item">
<span>用例异常 100% : 1 个</span>
<div class="barchart_barbox">
<div class="barchart_bar" style="width: 100.0%; background-color: #9c27b0;"></div>
</div>
</div>
<div class="barchar_item">
<span>用例阻塞 0% : 0 个</span>
<div class="barchart_barbox">
<div class="barchart_bar" style="width: 0.0%; background-color: #dcbdbd;"></div>
</div>
</div>
</div>
</div>
<div style="margin-top:2em">
<h3 style="display:inline">执行日志</h3>
</div>
<div class="exec_log">
<div class="suite_dir" id="suite_dir cases\主流程功能\">
<div>
<span class="label">进入目录</span>
<span>cases\主流程功能\</span>
</div>
<div class="suite_setup setup" id="suite_setup setup cases\主流程功能\">
<div class="folder_header">
<span class="label">套件初始化</span>
<span>cases\主流程功能\</span>
<span class="executetime">2025-03-21 17:23:09</span>
</div>
<div class="folder_body">
<div class="case_step">
<span class="tag">步骤 #1</span>
<span>初始化浏览器</span>
</div>
<div class="info">'----------' 正在初始化浏览器 '----------'</div>
<div class="info">'----------' 浏览器初始化完成 '----------'</div>
<div class="case_step">
<span class="tag">步骤 #2</span>
<span>登录系统</span>
</div>
</div>
</div>
</div>
<div class="suite_file" id="suite_file cases\主流程功能\04调试创建会议.py">
<div>
<span class="label">进入文件</span>
<span>cases\主流程功能\04调试创建会议.py</span>
</div>
<div class="case abort" id="case_00000001">
<div class="folder_header">
<span class="label caselabel">用例 ABORT</span>
<span class="casename">Unified_Platform_0001</span>
<span class="executetime">2025-03-21 17:23:20</span>
</div>
<div class="folder_body">
<span class="case_class_path">cases\主流程功能\04调试创建会议.py::Unified_Platform_0001</span>
<div class="test_steps" id="test_steps Unified_Platform_0001">
<span class="label">测试步骤</span>
<div class="info error-info">Message: no such window: target window already closed
from unknown error: web view not found
(Session info: chrome=131.0.6778.264)
Stacktrace:
GetHandleVerifier [0x010AFD53+23747]
(No symbol) [0x01037D54]
(No symbol) [0x00F0BE53]
(No symbol) [0x00EED91B]
(No symbol) [0x00F77EFF]
(No symbol) [0x00F8AD49]
(No symbol) [0x00F71B96]
(No symbol) [0x00F43F3C]
(No symbol) [0x00F44EBD]
GetHandleVerifier [0x0138AC73+3017699]
GetHandleVerifier [0x0139B93B+3086507]
GetHandleVerifier [0x013940F2+3055714]
GetHandleVerifier [0x01145AF0+637536]
(No symbol) [0x01040A5D]
(No symbol) [0x0103DA28]
(No symbol) [0x0103DBC5]
(No symbol) [0x010307F0]
BaseThreadInitThunk [0x765E7BA9+25]
RtlInitializeExceptionChain [0x77B6C28B+107]
RtlClearBits [0x77B6C20F+191]
Traceback:
File &quot;D:\GithubData\自动化\ubains-module-test\统一平台\cases\主流程功能\04调试创建会议.py&quot;, line 27, in teststeps
safe_click((By.XPATH, &quot;//p[contains(text(),'新建会议')]&quot;), wd)
File &quot;D:\GithubData\自动化\ubains-module-test\统一平台\base\bases.py&quot;, line 239, in safe_click
element = WebDriverWait(wd, 5).until(EC.visibility_of_element_located(element_locator))
File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\support\wait.py&quot;, line 96, in until
value = method(self._driver)
File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\support\expected_conditions.py&quot;, line 156, in _predicate
return _element_if_visible(driver.find_element(*locator))
File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py&quot;, line 770, in find_element
return self.execute(Command.FIND_ELEMENT, {&quot;using&quot;: by, &quot;value&quot;: value})[&quot;value&quot;]
File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py&quot;, line 384, in execute
self.error_handler.check_response(response)
File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\errorhandler.py&quot;, line 232, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchWindowException: Message: no such window: target window already closed
from unknown error: web view not found
(Session info: chrome=131.0.6778.264)
Stacktrace:
GetHandleVerifier [0x010AFD53+23747]
(No symbol) [0x01037D54]
(No symbol) [0x00F0BE53]
(No symbol) [0x00EED91B]
(No symbol) [0x00F77EFF]
(No symbol) [0x00F8AD49]
(No symbol) [0x00F71B96]
(No symbol) [0x00F43F3C]
(No symbol) [0x00F44EBD]
GetHandleVerifier [0x0138AC73+3017699]
GetHandleVerifier [0x0139B93B+3086507]
GetHandleVerifier [0x013940F2+3055714]
GetHandleVerifier [0x01145AF0+637536]
(No symbol) [0x01040A5D]
(No symbol) [0x0103DA28]
(No symbol) [0x0103DBC5]
(No symbol) [0x010307F0]
BaseThreadInitThunk [0x765E7BA9+25]
RtlInitializeExceptionChain [0x77B6C28B+107]
RtlClearBits [0x77B6C20F+191]
</div>
</div>
</div>
</div>
<div class="suite_teardown teardown" id="suite_teardown teardown cases\主流程功能\">
<div class="folder_header">
<span class="label">套件清除</span>
<span>cases\主流程功能\</span>
<span class="executetime">2025-03-21 17:23:26</span>
</div>
<div class="folder_body">
<div class="info">清除浏览器</div>
</div>
</div>
</div>
</div>
</div>
<div id="float_menu">
<div class="menu-item" onclick="document.querySelector(&quot;body&quot;).scrollIntoView()">页首</div>
<div class="menu-item" onclick="window.open(&quot;http://www.byhy.net/tut/auto/hytest/01&quot;, &quot;_blank&quot;); ">帮助</div>
<div class="menu-item" id="display_mode" onclick="toggle_folder_all_cases()">Summary</div>
<div class="error_jumper" display="block">
<div class="menu-item" onclick="previous_error()" title="上一个错误"></div>
<div class="menu-item" onclick="next_error()" title="下一个错误"></div>
</div>
</div>
</body>
</html>
\ No newline at end of file
...@@ -1721,13 +1721,14 @@ def approval_status_control(message_name, approval_type, wd): ...@@ -1721,13 +1721,14 @@ def approval_status_control(message_name, approval_type, wd):
import os import os
import openpyxl import openpyxl
import logging import logging
def write_xlsx_data(xlsx_file_path, sheet_name, column_name, data): def write_xlsx_data(xlsx_file_path, sheet_name, function_number, column_name, data):
""" """
在XLSX文件的指定列的第四行开始填充测试数据。 在XLSX文件的指定列的指定功能编号的行开始填充测试数据。
参数: 参数:
xlsx_file_path (str): XLSX文件的路径。 xlsx_file_path (str): XLSX文件的路径。
sheet_name (str): 工作表的名称。 sheet_name (str): 工作表的名称。
function_number (str): 功能编号,用于匹配行。
column_name (str): 要写入数据的列名。 column_name (str): 要写入数据的列名。
data (list): 要写入的数据列表。 data (list): 要写入的数据列表。
""" """
...@@ -1754,20 +1755,31 @@ def write_xlsx_data(xlsx_file_path, sheet_name, column_name, data): ...@@ -1754,20 +1755,31 @@ def write_xlsx_data(xlsx_file_path, sheet_name, column_name, data):
# 打印表头列名 # 打印表头列名
logging.info(f"表头列名: {headers}") logging.info(f"表头列名: {headers}")
# 找到表头中名为 'column_name' 的列索引 # 找到表头中名为 'function_number' 和 'column_name' 的列索引
try:
function_number_index = headers.index("功能编号")
except ValueError as e:
raise ValueError(f"表头中没有找到 '功能编号' 列: {e}")
try: try:
column_index = headers.index(column_name) column_index = headers.index(column_name)
except ValueError as e: except ValueError as e:
raise ValueError(f"表头中没有找到所需的列: {column_name}") raise ValueError(f"表头中没有找到所需的列: {column_name}")
# 从第四行开始写入数据 # 遍历数据行,找到与给定功能编号匹配的行
for row_num, value in enumerate(data, start=4): for row in sheet.iter_rows(min_row=4, values_only=True):
cell = sheet.cell(row=row_num, column=column_index + 1) # 列索引从1开始 if row[function_number_index] == function_number:
cell.value = value row_num = row[0].row
for data_index, value in enumerate(data, start=0):
cell = sheet.cell(row=row_num + data_index, column=column_index + 1) # 列索引从1开始
cell.value = value
break
else:
raise ValueError(f"未找到功能编号为 {function_number} 的行")
# 保存修改后的文件 # 保存修改后的文件
try: try:
workbook.save(xlsx_file_path) workbook.save(xlsx_file_path)
logging.info(f"文件 {xlsx_file_path} 已保存,数据已写入列 {column_name} 的第四行开始。") logging.info(f"文件 {xlsx_file_path} 已保存,数据已写入功能编号为 {function_number} 的行,列 {column_name}。")
except Exception as e: except Exception as e:
logging.error(f"保存文件时出错: {e}") logging.error(f"保存文件时出错: {e}")
\ No newline at end of file
...@@ -266,4 +266,4 @@ ...@@ -266,4 +266,4 @@
- 补充clear_columns_in_xlsx函数实现在读取测试用例前,先将测试结果和日志截图清空。 - 补充clear_columns_in_xlsx函数实现在读取测试用例前,先将测试结果和日志截图清空。
71. 2025-03-21 71. 2025-03-21
- 实现通过JSON数据中对应的name值来区分测试用例数量。 - 实现通过JSON数据中对应的name值来区分测试用例数量。
- 补充write_xlsx_data函数用以将测试结果与日志截图写入到xlsx测试用例文件中。 - 补充write_xlsx_data函数用以将测试结果与日志截图写入到xlsx测试用例文件中。调试write_xlsx_data函数与统一平台的窗口切换关闭。
\ No newline at end of file \ No newline at end of file
...@@ -63,9 +63,9 @@ class ChangAnMessageApproval: ...@@ -63,9 +63,9 @@ class ChangAnMessageApproval:
"Template_Edit", "长安审批测试") "Template_Edit", "长安审批测试")
INFO(f"提示信息为:{notify_text}") INFO(f"提示信息为:{notify_text}")
if CHECK_POINT("编辑测试判断是否正确", expented_result in notify_text): if CHECK_POINT("编辑测试判断是否正确", expented_result in notify_text):
write_xlsx_data(xlsx_file_path, "会议审批", "测试结果", "通过") write_xlsx_data(xlsx_file_path, "会议审批", name,"测试结果", "通过")
else: else:
write_xlsx_data(xlsx_file_path, "会议审批", "测试结果", "失败") write_xlsx_data(xlsx_file_path, "会议审批", name,"测试结果", "失败")
SELENIUM_LOG_SCREEN(wd, "50") SELENIUM_LOG_SCREEN(wd, "50")
elif element_type == "function": elif element_type == "function":
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论