<!DOCTYPE html>
<html>
  <head>
    <title>会议预约测试报告</title>
    <meta charset="UTF-8">
    <style>body {    
    font-family: consolas, Verdana, sans-serif;
    font-size: .95em;
    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;
}</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");
});



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="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/01/10 08:55:33</td>
            </tr>
            <tr>
              <td>结束时间</td>
              <td>2025/01/10 08:57:59</td>
            </tr>
            <tr>
              <td>耗时</td>
              <td>145.495 秒</td>
            </tr>
            <tr>
              <td>预备执行用例数量</td>
              <td>1</td>
            </tr>
            <tr>
              <td>实际执用例行数量</td>
              <td>0</td>
            </tr>
            <tr>
              <td>通过</td>
              <td>0</td>
            </tr>
            <tr>
              <td>失败</td>
              <td style="">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="color:red">1</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>
          </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>用例异常 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>用例阻塞 100% : 1 个</span>
            <div class="barchart_barbox">
              <div class="barchart_bar" style="width: 100.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>
        <div class="suite_dir" id="suite_dir cases\展厅巡检\00展厅中控屏\">
          <div>
            <span class="label">进入目录</span>
            <span>cases\展厅巡检\00展厅中控屏\</span>
          </div>
          <div class="suite_setup setup fail" id="suite_setup setup cases\展厅巡检\00展厅中控屏\">
            <div class="folder_header">
              <span class="label">套件初始化</span>
              <span>cases\展厅巡检\00展厅中控屏\</span>
              <span class="executetime">2025-01-10 08:55:33</span>
            </div>
            <div class="folder_body">
              <div class="case_step">
                <span class="tag">步骤 #1</span>
                <span>初始化设备adb连接</span>
              </div>
              <div class="info">'----------' 正在初始化浏览器 '----------'</div>
              <div class="info error-info">suite setup fail | Could not reach host. Are you offline? 
Traceback:
  File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connectionpool.py&quot;, line 536, in _make_request
    response = conn.getresponse()
  File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connection.py&quot;, line 507, in getresponse
    httplib_response = super().getresponse()
  File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\http\client.py&quot;, line 1374, in getresponse
    response.begin()
  File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\http\client.py&quot;, line 318, in begin
    version, status, reason = self._read_status()
  File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\http\client.py&quot;, line 287, in _read_status
    raise RemoteDisconnected(&quot;Remote end closed connection without&quot;
http.client.RemoteDisconnected: Remote end closed connection without response

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\adapters.py&quot;, line 667, in send
    resp = conn.urlopen(
  File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connectionpool.py&quot;, line 843, in urlopen
    retries = retries.increment(
  File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\util\retry.py&quot;, line 474, in increment
    raise reraise(type(error), error, _stacktrace)
  File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\util\util.py&quot;, line 38, in reraise
    raise value.with_traceback(tb)
  File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connectionpool.py&quot;, line 789, in urlopen
    response = self._make_request(
  File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connectionpool.py&quot;, line 536, in _make_request
    response = conn.getresponse()
  File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connection.py&quot;, line 507, in getresponse
    httplib_response = super().getresponse()
  File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\http\client.py&quot;, line 1374, in getresponse
    response.begin()
  File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\http\client.py&quot;, line 318, in begin
    version, status, reason = self._read_status()
  File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\http\client.py&quot;, line 287, in _read_status
    raise RemoteDisconnected(&quot;Remote end closed connection without&quot;
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\webdriver_manager\core\http.py&quot;, line 32, in get
    resp = requests.get(
  File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\api.py&quot;, line 73, in get
    return request(&quot;get&quot;, url, params=params, **kwargs)
  File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\api.py&quot;, line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\sessions.py&quot;, line 589, in request
    resp = self.send(prep, **send_kwargs)
  File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\sessions.py&quot;, line 703, in send
    r = adapter.send(request, **kwargs)
  File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\adapters.py&quot;, line 682, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\hytest\utils\runner.py&quot;, line 501, in execTest
    suite_setup()
  File &quot;D:\GithubData\自动化\ubains-module-test\预定系统\cases\展厅巡检\00展厅中控屏\__st__.py&quot;, line 24, in suite_setup
    browser_init(login_url)
  File &quot;D:\GithubData\自动化\ubains-module-test\预定系统\Base\base.py&quot;, line 71, in browser_init
    service = ChromeService(ChromeDriverManager().install())
  File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\webdriver_manager\chrome.py&quot;, line 40, in install
    driver_path = self._get_driver_binary_path(self.driver)
  File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\webdriver_manager\core\manager.py&quot;, line 40, in _get_driver_binary_path
    file = self._download_manager.download_file(driver.get_driver_download_url(os_type))
  File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\webdriver_manager\drivers\chrome.py&quot;, line 45, in get_driver_download_url
    modern_version_url = self.get_url_for_version_and_platform(driver_version_to_download, os_type)
  File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\webdriver_manager\drivers\chrome.py&quot;, line 75, in get_url_for_version_and_platform
    response = self._http_client.get(url)
  File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\webdriver_manager\core\http.py&quot;, line 35, in get
    raise exceptions.ConnectionError(f&quot;Could not reach host. Are you offline?&quot;)
requests.exceptions.ConnectionError: Could not reach host. Are you offline?
</div>
            </div>
          </div>
          <div class="suite_teardown teardown fail" id="suite_teardown teardown cases\">
            <div class="folder_header">
              <span class="label">套件清除</span>
              <span>cases\</span>
              <span class="executetime">2025-01-10 08:57:59</span>
            </div>
            <div class="folder_body">
              <div class="info">清除浏览器</div>
              <div class="info error-info">suite teardown fail | 'NoneType' object has no attribute 'quit' 
Traceback:
  File &quot;D:\GithubData\自动化\ubains-module-test\预定系统\cases\__st__.py&quot;, line 24, in suite_teardown
    browser_quit()
  File &quot;D:\GithubData\自动化\ubains-module-test\预定系统\Base\base.py&quot;, line 467, in browser_quit
    wd.quit()
AttributeError: 'NoneType' object has no attribute 'quit'
</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>