Merge "Fixed deletion of last character with no place-holder text" into devel/master
[platform/core/uifw/dali-toolkit.git] / automated-tests / style / summary.xsl
1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsl:stylesheet version="1.0"
3         xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
4         <xsl:output method="html" version="1.0" encoding="UTF-8"
5                 indent="yes" />
6         <xsl:template match="/">
7                 <html>
8                         <STYLE type="text/css">
9                                 @import "./style/tests.css";
10                         </STYLE>
11                         <head>
12                                 <script type="text/javascript" src="./style/jquery.min.js" />
13                         </head>
14                         <body>
15                                 <div id="testcasepage">
16                                         <div id="title">
17                                                 <table>
18                                                         <tr>
19                                                                 <td>
20                                                                         <h1>TCT Report</h1>
21                                                                 </td>
22                                                         </tr>
23                                                 </table>
24                                         </div>
25                                         <div id="overview">
26                                         <table>
27                                                 <tr>
28                                                         <td>
29                                         <div id="summary">
30                                                 <table>
31                                                         <tr>
32                                                                 <th colspan="2">Test Summary</th>
33                                                         </tr>
34                                                         <!-- tr>
35                                                                 <td>TCT Version</td>
36                                                                 <td>
37                                                                         <xsl:value-of select="result_summary/environment/@cts_version" />
38                                                                 </td>
39                                                         </tr -->
40                                                         <tr>
41                                                                 <td>Test Plan Name</td>
42                                                                 <td>
43                                                                         <xsl:value-of select="result_summary/@plan_name" />
44                                                                 </td>
45                                                         </tr>
46                                                         <tr>
47                                                                 <td>Build ID</td>
48                                                                 <td>
49                                                                         <xsl:choose>
50                                                                                 <xsl:when test="result_summary/environment/@build_id">
51                                                                                         <xsl:if test="result_summary/environment/@build_id = ''">
52                                                                                                 N/A
53                                                                                         </xsl:if>
54                                                                                         <xsl:value-of select="result_summary/environment/@build_id" />
55                                                                                 </xsl:when>
56                                                                                 <xsl:otherwise>
57                                                                                         N/A
58                                                                                 </xsl:otherwise>
59                                                                         </xsl:choose>
60                                                                 </td>
61                                                         </tr>
62                                                         <tr>
63                                                                 <td>Test Total</td>
64                                                                 <td>
65                                                                         <xsl:value-of select="sum(result_summary//suite/total_case)" />
66                                                                 </td>
67                                                         </tr>
68                                                         <tr>
69                                                                 <td>Test Passed</td>
70                                                                 <td>
71                                                                         <xsl:value-of select="sum(result_summary//suite/pass_case)" />
72                                                                 </td>
73                                                         </tr>
74                                                         <tr>
75                                                                 <td>Test Failed</td>
76                                                                 <td>
77                                                                         <xsl:value-of select="sum(result_summary//suite/fail_case)" />
78                                                                 </td>
79                                                         </tr>
80                                                         <tr>
81                                                                 <td>Test Blocked</td>
82                                                                 <td>
83                                                                         <xsl:value-of select="sum(result_summary//suite/block_case)" />
84                                                                 </td>
85                                                         </tr>
86                                                         <tr>
87                                                                 <td>Test Not Executed</td>
88                                                                 <td>
89                                                                         <xsl:value-of select="sum(result_summary//suite/na_case)" />
90                                                                 </td>
91                                                         </tr>
92                                                         <tr>
93                                                                 <td>Time</td>
94                                                                 <td>
95                                                                         <xsl:value-of select="result_summary/summary/start_at" />
96                                                                         ~
97                                                                         <xsl:value-of select="result_summary/summary/end_at" />
98                                                                 </td>
99                                                         </tr>
100                                                 </table>
101                                         </div>
102                                         </td>
103                                         <td>
104                                         <div id="device">
105                                                 <table>
106                                                         <tr>
107                                                                 <th colspan="2">Device Information</th>
108                                                         </tr>
109                                                         <tr>
110                                                                 <td>Host Device</td>
111                                                                 <td>
112                                                                         <xsl:choose>
113                                                                                 <xsl:when test="result_summary/environment/@host">
114                                                                                         <xsl:if test="result_summary/environment/@host = ''">
115                                                                                                 N/A
116                                                                                         </xsl:if>
117                                                                                         <xsl:value-of select="result_summary/environment/@host" />
118                                                                                 </xsl:when>
119                                                                                 <xsl:otherwise>
120                                                                                         N/A
121                                                                                 </xsl:otherwise>
122                                                                         </xsl:choose>
123                                                                 </td>
124                                                         </tr>
125                                                         <tr>
126                                                                 <td>Manufacturer</td>
127                                                                 <td>
128                                                                         <xsl:choose>
129                                                                                 <xsl:when test="result_summary/environment/@manufacturer">
130                                                                                         <xsl:if test="result_summary/environment/@manufacturer = ''">
131                                                                                                 N/A
132                                                                                         </xsl:if>
133                                                                                         <xsl:value-of select="result_summary/environment/@manufacturer" />
134                                                                                 </xsl:when>
135                                                                                 <xsl:otherwise>
136                                                                                         N/A
137                                                                                 </xsl:otherwise>
138                                                                         </xsl:choose>
139                                                                 </td>
140                                                         </tr>
141                                                         <tr>
142                                                                 <td>Device Model</td>
143                                                                 <td>
144                                                                         <xsl:choose>
145                                                                                 <xsl:when test="result_summary/environment/@device_model">
146                                                                                         <xsl:if test="result_summary/environment/@device_model = ''">
147                                                                                                 N/A
148                                                                                         </xsl:if>
149                                                                                         <xsl:value-of select="result_summary/environment/@device_model" />
150                                                                                 </xsl:when>
151                                                                                 <xsl:otherwise>
152                                                                                         N/A
153                                                                                 </xsl:otherwise>
154                                                                         </xsl:choose>
155                                                                 </td>
156                                                         </tr>
157                                                         <tr>
158                                                                 <td>Device ID</td>
159                                                                 <td>
160                                                                         <xsl:choose>
161                                                                                 <xsl:when test="result_summary/environment/@device_id">
162                                                                                         <xsl:if test="result_summary/environment/@device_id = ''">
163                                                                                                 N/A
164                                                                                         </xsl:if>
165                                                                                         <xsl:value-of select="result_summary/environment/@device_id" />
166                                                                                 </xsl:when>
167                                                                                 <xsl:otherwise>
168                                                                                         N/A
169                                                                                 </xsl:otherwise>
170                                                                         </xsl:choose>
171                                                                 </td>
172                                                         </tr>
173                                                         <tr>
174                                                                 <td>Screen Size</td>
175                                                                 <td>
176                                                                         <xsl:choose>
177                                                                                 <xsl:when test="result_summary/environment/@screen_size">
178                                                                                         <xsl:if test="result_summary/environment/@screen_size = ''">
179                                                                                                 N/A
180                                                                                         </xsl:if>
181                                                                                         <xsl:value-of select="result_summary/environment/@screen_size" />
182                                                                                 </xsl:when>
183                                                                                 <xsl:otherwise>
184                                                                                         N/A
185                                                                                 </xsl:otherwise>
186                                                                         </xsl:choose>
187                                                                 </td>
188                                                         </tr>
189                                                         <tr>
190                                                                 <td>Resolution</td>
191                                                                 <td>
192                                                                         <xsl:choose>
193                                                                                 <xsl:when test="result_summary/environment/@resolution">
194                                                                                         <xsl:if test="result_summary/environment/@resolution = ''">
195                                                                                                 N/A
196                                                                                         </xsl:if>
197                                                                                         <xsl:value-of select="result_summary/environment/@resolution" />
198                                                                                 </xsl:when>
199                                                                                 <xsl:otherwise>
200                                                                                         N/A
201                                                                                 </xsl:otherwise>
202                                                                         </xsl:choose>
203                                                                 </td>
204                                                         </tr>
205                                                 </table>
206                                         </div>
207                                         </td>
208                                         </tr>
209                                         </table>
210                                         </div>
211
212                                         <div id="capability">
213                                                 <div id="title">
214                                                         <a name="contents"></a>
215                                                         <table>
216                                                                 <tr>
217                                                                         <td class="title">
218                                                                                 <h1><a href="#" class="see_capabilities">Device Capability</a></h1>
219                                                                         </td>
220                                                                 </tr>
221                                                         </table>
222                                                 </div>
223                                                 <xsl:choose>
224                                                         <xsl:when test="result_summary/capabilities">
225                                                                 <div id="capability_table" style="display:none;">
226                                                                 <table>
227                                                                         <tr>
228                                                                                 <th>Capability Name</th>
229                                                                                 <th>Type</th>
230                                                                                 <th>Value</th>
231                                                                         </tr>
232                                                                         <xsl:for-each select="result_summary/capabilities/capability">
233                                                                                 <xsl:sort select="@name" />
234                                                                                 <tr>
235                                                                                         <td>
236                                                                                                 <xsl:value-of select="@name" />
237                                                                                         </td>
238                                                                                         <td>
239                                                                                                 <xsl:value-of select="@type" />
240                                                                                         </td>
241                                                                                         <td>
242                                                                                                 <xsl:choose>
243                                                                                                         <xsl:when test="value">
244                                                                                                                 <xsl:value-of select="value" />
245                                                                                                         </xsl:when>
246                                                                                                         <xsl:otherwise>
247                                                                                                                 <xsl:value-of select="@support" />
248                                                                                                         </xsl:otherwise>
249                                                                                                 </xsl:choose>
250                                                                                         </td>
251                                                                                 </tr>
252                                                                         </xsl:for-each>
253                                                                 </table>
254                                                                 </div>
255                                                         </xsl:when>
256                                                         <xsl:otherwise>
257                                                                 The information of device capability is not available.
258                                                         </xsl:otherwise>
259                                                 </xsl:choose>
260                                         </div>
261
262                                         <div id="suite_summary">
263                                                 <div id="title">
264                                                         <a name="contents"></a>
265                                                         <table>
266                                                                 <tr>
267                                                                         <td class="title">
268                                                                                 <h1>Test Summary by Suite</h1>
269                                                                         </td>
270                                                                 </tr>
271                                                         </table>
272                                                 </div>
273                                                 <table>
274                                                         <tr>
275                                                                 <th>Suite</th>
276                                                                 <th>Total</th>
277                                                                 <th>Passed</th>
278                                                                 <th>Failed</th>
279                                                                 <th>Blocked</th>
280                                                                 <th>Not Executed</th>
281                                                                 <th class="Ratio">Ratio</th>
282                                                         </tr>
283                                                         <xsl:for-each select="result_summary/suite">
284                                                                 <xsl:sort select="@name" />
285                                                                 <tr class="suite_item">
286                                                                         <xsl:attribute name="id">
287                                                 <xsl:value-of
288                                                                                 select="@name" />
289                                     </xsl:attribute>
290                                                                         <td>
291                                                                                 <a>
292                                                                                         <xsl:attribute name="href"><xsl:value-of
293                                                                                                 select="@name" />.xml</xsl:attribute>
294                                                                                         <xsl:value-of select="@name" />
295                                                                                 </a>
296                                                                         </td>
297                                                                         <td class="total">
298                                                                                 <xsl:value-of select="total_case" />
299                                                                         </td>
300                                                                         <td class="pass">
301                                                                                 <xsl:value-of select="pass_case" />
302                                                                         </td>
303                                                                         <td class="fail">
304                                                                                 <xsl:value-of select="fail_case" />
305                                                                         </td>
306                                                                         <td class="block">
307                                                                                 <xsl:value-of select="block_case" />
308                                                                         </td>
309                                                                         <td class="na">
310                                                                                 <xsl:value-of select="na_case" />
311                                                                         </td>
312                                                                         <td class="Ratio">
313                                                                                 <div class="RatioGraphic" />
314                                                                         </td>
315                                                                 </tr>
316                                                         </xsl:for-each>
317                                                 </table>
318                                         </div>
319
320                                 </div>
321                                 <div id="goTopBtn">
322                                         <img border="0" src="./style/back_top.png" />
323                                 </div>
324                                 <script type="text/javascript" src="./style/application.js" />
325                                 <script language="javascript" type="text/javascript">
326                                         $(document).ready(function(){
327                                         goTopEx();
328                                         drawRatio();
329                                         });
330                                 </script>
331                         </body>
332                 </html>
333         </xsl:template>
334         <xsl:template name="br-replace">
335                 <xsl:param name="word" />
336                 <xsl:variable name="cr">
337                         <xsl:text>\n</xsl:text>
338                 </xsl:variable>
339                 <xsl:choose>
340                         <xsl:when test="contains($word,$cr)">
341                                 <xsl:value-of select="substring-before($word,$cr)" />
342                                 <br />
343                                 <xsl:call-template name="br-replace">
344                                         <xsl:with-param name="word" select="substring-after($word,$cr)" />
345                                 </xsl:call-template>
346                         </xsl:when>
347                         <xsl:otherwise>
348                                 <xsl:value-of select="$word" />
349                         </xsl:otherwise>
350                 </xsl:choose>
351         </xsl:template>
352 </xsl:stylesheet>