OSDN Git Service

- ethna_sysmsg.ini parse bug fix.
[ethna/ethna.git] / tpl / unittest.tpl
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html lang="ja">
3 <head>
4   <meta http-equiv="Content-Type" content="text/html; charset="UTF-8">
5   <meta http-equiv="Content-Style-Type" content="text/css">
6     <title>{$app.app_id} - Ethna UnitTest</title>
7     <style type="text/css">
8         <!--
9         {literal}
10             body {
11                 margin: auto;
12                 background-color: #ffffff;
13                 color: #000000;
14             }
15             body, td, th, h1, h2 {font-family: sans-serif;}
16             pre {margin: 0px; font-family: monospace;}
17             a:link {color: #000099; text-decoration: none; background-color: #ffffff;}
18             a:hover {text-decoration: underline;}
19             table { margin: auto; border-collapse: collapse;}
20             .center {text-align: center;}
21             .center table { text-align: left;}
22             .center th { text-align: center !important; }
23             td, th { border: 1px solid #000000; font-size: 75%; vertical-align: top;}
24             h1 {font-size: 150%;}
25             h2 {font-size: 125%;}
26             .p {text-align: left;}
27             .e {background-color: #ccccff; font-weight: bold; color: #000000;}
28             .h {background-color: #9999cc; font-weight: bold; color: #000000;}
29             .v {background-color: #cccccc; color: #000000;}
30             .vf {background-color: #cccccc; color: red;}
31             i {color: #666666; background-color: #cccccc;}
32             img {float: right; border: 0px;}
33             hr {width: 600px; background-color: #cccccc; border: 0px; height: 1px; color: #000000;}
34             .header {
35                 margin: auto;
36                 width:600px;
37                 background-color: #9999cc;
38                 padding:0.2em;
39                 border:solid 1px black;
40             }
41         {/literal}
42         //-->
43         </style>
44 </head>
45   <body>
46     <div class="center">
47       <div class="header"><h1>{$app.app_id}</h1></div>
48       <h2>Report</h2>
49       <table border="0" cellpadding="2" width="600">
50       {foreach from=$app.report key="key" item="item"}
51         {if $item.type=='Pass'}
52           <tr>
53             <th class="e">{$item.test}</th>
54             <td class="v">{$item.message}</td>
55           </tr>
56         {elseif $item.type=='CaseEnd'}
57         {elseif $item.type=='CaseStart'}
58           <tr class="h">
59             <th colspan="2">{$item.test_name}</th>
60           </tr>
61         {elseif $item.type=='Exception'}
62           <tr>
63             <th class="e">{$item.test}</th>
64             <td class="vf">Exception 
65               <ul>{foreach from=$item.breadcrumb item="crumb"}<li>{$crumb}</li>{/foreach}</ul><strong>{$message|escape:"html"}</strong><br />
66             </td>
67           </tr>
68         {elseif $item.type=='Fail'}
69           <tr>
70             <th class="e">{$item.test}</th>
71             <td class="vf"><strong>Fail</strong> {$item.message}</td>
72           </tr>
73         {else}
74           <tr class="v">
75             <td colspan="2">{$item.message}</td>
76           </tr>
77         {/if} 
78       {foreachelse}
79           <tr>
80             <td>You don't create any Testcase.</td>
81           </tr>
82           <tr>
83             <td>
84               <div class="header">
85                 <p>
86                   you can generate testcase with the following commands.
87                 </p>
88                 <p>
89                   ethna add-action-test [testcasename]<br>
90                   ethna add-view-test   [testcasename]<br>
91                   ethna add-test        [testcasename]
92                 </p>
93               </div>
94           </tr>
95       {/foreach}
96       </table>
97       <h2>Result</h2>
98       <p>
99         {$app.result.TestCaseProgress}/{$app.result.TestCaseCount} test cases complete:
100         <strong>{$app.result.PassCount}</strong> passes, 
101         <strong>{$app.result.FailCount}</strong> fails and 
102         <strong>{$app.result.ExceptionCount}</strong> exceptions.
103       </p>
104       <br />
105       <hr />
106       powered by <a href="http://ethna.jp/">Ethna {$app.ethna_version}</a>
107       <hr />
108     </div>
109   </body>
110 </html>