<!DOCTYPE html>
<html>
<head>
    <title>测试结果汇总</title>
    <style>
        table,table tr th,table tr td {
            border:1px solid #ccc;
            border-collapse: collapse;
			color: #669;
			padding: 6px 8px;
            font-size: 14px;
        }
        table caption {
			font-size: 14px;
			color: #039;
			text-align: left;
            margin-top: 10px;
			margin-bottom: -10px;
            margin-left: -10px;
		}
        .fail {
            color: red;
			width: 7em;
			text-align: center;
        }
        .success {
            color: green;
			width: 7em;
			text-align: center;
        }
		.details-col-elapsed {
			width: 7em;
			text-align: center;
		}
		.details-col-msg {
			width: 7em;
			text-align: center;
			background-color:#ccc;
		}

    </style>
</head>
<body>
<div>
<!--<div><h2>Test Statistics</h2></div>-->

    <table width="1000">
        <caption><ul><li>测试概要</li></ul></caption>
        <tr  width="600">
            <th width="300" class='details-col-msg'>用例总数</th>
            <th class='details-col-msg'>成功数</th>
            <th class='details-col-msg'>运行用时</th>
            <th class='details-col-msg'>成功率</th>
        </tr>

        <tr width="600">
            <td class='details-col-elapsed'>{{summary_message.caseNum}}</td>
            <td class='details-col-elapsed'>{{summary_message.passNum}}</td>
            <td class='details-col-elapsed'>{{summary_message.time}}</td>
            <td class="details-col-elapsed">{{summary_message.passRate}}%</td>
        </tr>
    </table>

 <!--<div><h2>Test detail</h2></div>-->
    <table width="1000">
        <caption><ul><li>测试列表</li></ul></caption>
        <tr  width="600">
            <th width="400" class='details-col-msg'>用例名称</th>
            <th class='details-col-msg'>执行结果</th>
            <th class='details-col-msg'>执行时间(秒)</th>
            <th class='details-col-msg'>用例作者</th>
            <th class='details-col-msg'>接口响应时间(秒)</th>
        </tr>
        {% for r in case_results %}
        <tr width="600">
            <td class="details-col-elapsed"><a href='{{log_path}}/{{r.name}}/log.html' target='_blank'>{{r.name}}</a></td>
            <td class="{{'success' if r.result else 'fail'}}">{{"成功" if r.result else "失败"}}</td>
            <td class="details-col-elapsed">{{r.time}}</td>
            <td class="details-col-elapsed">{{r.author}}</td>
            <td class="details-col-elapsed">{{r.api_time}}</td>
        </tr>
        {% endfor %}
    </table>
<div><h2></h2></div>
</div>
</body>
</html>
