1 <?xml version="1.0" encoding="utf-8"?> 2 <!-- Copyright (C) 2008 The Android Open Source Project 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 --> 16 17 <!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp " "> ]> 18 <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 19 <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/> 20 21 <xsl:template match="/"> 22 23 <html> 24 <head> 25 <title>Test Report for <xsl:value-of select="TestResult/DeviceInfo/BuildInfo/@build_model" /> - <xsl:value-of select="TestResult/DeviceInfo/BuildInfo/@deviceID"/></title> 26 <script> 27 function toggle(id) { 28 e = document.getElementById(id) 29 e.style.display = e.style.display == "none" ? "block" : "none" 30 } 31 </script> 32 <STYLE type="text/css"> 33 @import "cts_result.css"; 34 </STYLE> 35 </head> 36 <body> 37 <DIV> 38 <TABLE class="title"> 39 <TR> 40 <TD width="40%" align="left"><img src="logo.gif"></img></TD> 41 <TD width="60%" align="left"> 42 <h1>Test Report for <xsl:value-of select="TestResult/DeviceInfo/BuildInfo/@build_model"/> - 43 <xsl:value-of select="TestResult/DeviceInfo/BuildInfo/@deviceID"/> 44 </h1> 45 </TD> 46 </TR> 47 </TABLE> 48 </DIV> 49 <img src="newrule-green.png" align="left"></img> 50 51 <br></br> 52 53 <center> 54 <a href="#" onclick="toggle('summary');">Show Device Information</a> 55 </center> 56 57 <br></br> 58 59 <DIV id="summary" style="display: none"> 60 <TABLE class="summary"> 61 <TR> 62 <TH colspan="2">Device Information</TH> 63 </TR> 64 <TR> 65 <TD width="50%"> 66 <!-- Device information --> 67 <TABLE> 68 <TR> 69 <TD class="rowtitle">Build Model</TD> 70 <TD> 71 <xsl:value-of select="TestResult/DeviceInfo/BuildInfo/@build_model"/> 72 </TD> 73 </TR> 74 <TR> 75 <TD class="rowtitle">Build Product</TD> 76 <TD> 77 <xsl:value-of select="TestResult/DeviceInfo/BuildInfo/@buildName"/> 78 </TD> 79 </TR> 80 <TR> 81 <TD class="rowtitle">Build Brand</TD> 82 <TD> 83 <xsl:value-of select="TestResult/DeviceInfo/BuildInfo/@build_brand"/> 84 </TD> 85 </TR> 86 <TR> 87 <TD class="rowtitle">Build Manufacturer</TD> 88 <TD> 89 <xsl:value-of select="TestResult/DeviceInfo/BuildInfo/@build_manufacturer"/> 90 </TD> 91 </TR> 92 <TR> 93 <TD class="rowtitle">Device ID</TD> 94 <TD> 95 <xsl:value-of select="TestResult/DeviceInfo/BuildInfo/@deviceID"/> 96 </TD> 97 </TR> 98 <TR> 99 <TD class="rowtitle">Android Version</TD> 100 <TD> 101 <xsl:value-of select="TestResult/DeviceInfo/BuildInfo/@buildVersion"/> 102 </TD> 103 </TR> 104 <TR> 105 <TD class="rowtitle">Build ID</TD> 106 <TD> 107 <xsl:value-of select="TestResult/DeviceInfo/BuildInfo/@buildID"/> 108 </TD> 109 </TR> 110 <TR> 111 <TD class="rowtitle">Build Fingerprint</TD> 112 <TD> 113 <xsl:value-of select="TestResult/DeviceInfo/BuildInfo/@build_fingerprint"/> 114 </TD> 115 </TR> 116 <TR> 117 <TD class="rowtitle">Build ABI</TD> 118 <TD> 119 <xsl:value-of 120 select="TestResult/DeviceInfo/BuildInfo/@build_abi"/> 121 </TD> 122 </TR> 123 <TR> 124 <TD class="rowtitle">Build ABI2</TD> 125 <TD> 126 <xsl:value-of 127 select="TestResult/DeviceInfo/BuildInfo/@build_abi2"/> 128 </TD> 129 </TR> 130 <TR> 131 <TD class="rowtitle">Android API Level</TD> 132 <TD> 133 <xsl:value-of select="TestResult/DeviceInfo/BuildInfo/@androidPlatformVersion"/> 134 </TD> 135 </TR> 136 <TR> 137 <TD class="rowtitle">Supported Locales</TD> 138 <TD> 139 <xsl:call-template name="formatDelimitedString"> 140 <xsl:with-param name="string" select="TestResult/DeviceInfo/BuildInfo/@locales"/> 141 </xsl:call-template> 142 </TD> 143 </TR> 144 <TR> 145 <TD class="rowtitle">Screen Size</TD> 146 <TD> 147 <xsl:value-of select="TestResult/DeviceInfo/Screen/@screen_size"/> 148 </TD> 149 </TR> 150 <TR> 151 <TD class="rowtitle">Resolution</TD> 152 <TD> 153 <xsl:value-of select="TestResult/DeviceInfo/Screen/@resolution"/> 154 </TD> 155 </TR> 156 <TR> 157 <TD class="rowtitle">Density</TD> 158 <TD> 159 <xsl:value-of select="TestResult/DeviceInfo/Screen/@screen_density"/> 160 (<xsl:value-of select="TestResult/DeviceInfo/Screen/@screen_density_bucket"/>) 161 </TD> 162 </TR> 163 <TR> 164 <TD class="rowtitle">Phone number</TD> 165 <TD> 166 <xsl:value-of select="TestResult/DeviceInfo/PhoneSubInfo/@subscriberId"/> 167 </TD> 168 </TR> 169 <TR> 170 <TD class="rowtitle">X dpi</TD> 171 <TD> 172 <xsl:value-of select="TestResult/DeviceInfo/BuildInfo/@Xdpi"/> 173 </TD> 174 </TR> 175 <TR> 176 <TD class="rowtitle">Y dpi</TD> 177 <TD> 178 <xsl:value-of select="TestResult/DeviceInfo/BuildInfo/@Ydpi"/> 179 </TD> 180 </TR> 181 <TR> 182 <TD class="rowtitle">Touch</TD> 183 <TD> 184 <xsl:value-of select="TestResult/DeviceInfo/BuildInfo/@touch"/> 185 </TD> 186 </TR> 187 <TR> 188 <TD class="rowtitle">Navigation</TD> 189 <TD> 190 <xsl:value-of select="TestResult/DeviceInfo/BuildInfo/@navigation"/> 191 </TD> 192 </TR> 193 <TR> 194 <TD class="rowtitle">Keypad</TD> 195 <TD> 196 <xsl:value-of select="TestResult/DeviceInfo/BuildInfo/@keypad"/> 197 </TD> 198 </TR> 199 <TR> 200 <TD class="rowtitle">Network</TD> 201 <TD> 202 <xsl:value-of select="TestResult/DeviceInfo/BuildInfo/@network"/> 203 </TD> 204 </TR> 205 <TR> 206 <TD class="rowtitle">IMEI</TD> 207 <TD> 208 <xsl:value-of select="TestResult/DeviceInfo/BuildInfo/@imei"/> 209 </TD> 210 </TR> 211 <TR> 212 <TD class="rowtitle">IMSI</TD> 213 <TD> 214 <xsl:value-of select="TestResult/DeviceInfo/BuildInfo/@imsi"/> 215 </TD> 216 </TR> 217 <TR> 218 <TD class="rowtitle">Open GL ES Version</TD> 219 <TD> 220 <xsl:value-of select="TestResult/DeviceInfo/BuildInfo/@openGlEsVersion"/> 221 </TD> 222 </TR> 223 <TR> 224 <TD class="rowtitle">Open GL Compressed Texture Formats</TD> 225 <TD> 226 <UL> 227 <xsl:for-each select="TestResult/DeviceInfo/OpenGLCompressedTextureFormatsInfo/TextureFormat"> 228 <LI><xsl:value-of select="@name" /></LI> 229 </xsl:for-each> 230 </UL> 231 </TD> 232 </TR> 233 <TR> 234 <TD class="rowtitle">Root Processes</TD> 235 <TD> 236 <UL> 237 <xsl:for-each select="TestResult/DeviceInfo/ProcessInfo/Process[@uid='0']"> 238 <LI><xsl:value-of select="@name" /></LI> 239 </xsl:for-each> 240 </UL> 241 </TD> 242 </TR> 243 244 </TABLE> 245 </TD> 246 247 <TD width="50%"> 248 <TABLE> 249 250 <TR> 251 <TD class="rowtitle">Features</TD> 252 <TD> 253 <xsl:for-each select="TestResult/DeviceInfo/FeatureInfo/Feature[@type='sdk']"> 254 <xsl:text>[</xsl:text> 255 <xsl:choose> 256 <xsl:when test="@available = 'true'"> 257 <xsl:text>X</xsl:text> 258 </xsl:when> 259 <xsl:otherwise> 260 <xsl:text>_</xsl:text> 261 </xsl:otherwise> 262 </xsl:choose> 263 <xsl:text>] </xsl:text> 264 265 <xsl:value-of select="@name" /> 266 <br /> 267 </xsl:for-each> 268 </TD> 269 </TR> 270 <TR> 271 <TD class="rowtitle">Other Features</TD> 272 <TD> 273 <UL> 274 <xsl:for-each select="TestResult/DeviceInfo/FeatureInfo/Feature[@type='other']"> 275 <LI><xsl:value-of select="@name" /></LI> 276 </xsl:for-each> 277 </UL> 278 </TD> 279 </TR> 280 <TR> 281 <TD class="rowtitle">System Libraries</TD> 282 <TD> 283 <UL> 284 <xsl:for-each select="TestResult/DeviceInfo/SystemLibrariesInfo/Library"> 285 <LI><xsl:value-of select="@name" /></LI> 286 </xsl:for-each> 287 </UL> 288 </TD> 289 </TR> 290 <TR> 291 <TD class="rowtitle">Partitions</TD> 292 <TD> 293 <pre> 294 <xsl:call-template name="formatDelimitedString"> 295 <xsl:with-param name="string" select="TestResult/DeviceInfo/BuildInfo/@partitions" /> 296 <xsl:with-param name="numTokensPerRow" select="1" /> 297 </xsl:call-template> 298 </pre> 299 </TD> 300 </TR> 301 <TR> 302 <TD class="rowtitle">Storage devices</TD> 303 <TD> 304 <xsl:value-of select="TestResult/DeviceInfo/BuildInfo/@storage_devices"/> 305 </TD> 306 </TR> 307 <TR> 308 <TD class="rowtitle">Multi-user support</TD> 309 <TD> 310 <xsl:value-of select="TestResult/DeviceInfo/BuildInfo/@multi_user"/> 311 </TD> 312 </TR> 313 </TABLE> 314 </TD> 315 </TR> 316 </TABLE> 317 <br /> 318 <br /> 319 </DIV> 320 321 <DIV> 322 <TABLE class="summary"> 323 <TR> 324 <TH colspan="2">Test Summary</TH> 325 </TR> 326 <TR> 327 <TD class="rowtitle">CTS version</TD> 328 <TD> 329 <xsl:value-of select="TestResult/HostInfo/Cts/@version"/> 330 </TD> 331 </TR> 332 <TR> 333 <TD class="rowtitle">Test timeout</TD> 334 <TD> 335 <xsl:value-of select="TestResult/HostInfo/Cts/IntValue[@name='testStatusTimeoutMs']/@value" /> ms 336 </TD> 337 </TR> 338 <TR> 339 <TD class="rowtitle">Host Info</TD> 340 <TD> 341 <xsl:value-of select="TestResult/HostInfo/@name"/> 342 (<xsl:value-of select="TestResult/HostInfo/Os/@name"/> - 343 <xsl:value-of select="TestResult/HostInfo/Os/@version"/>) 344 </TD> 345 </TR> 346 <TR> 347 <TD class="rowtitle">Plan name</TD> 348 <TD> 349 <xsl:value-of select="TestResult/@testPlan"/> 350 </TD> 351 </TR> 352 <TR> 353 <TD class="rowtitle">Start time</TD> 354 <TD> 355 <xsl:value-of select="TestResult/@starttime"/> 356 </TD> 357 </TR> 358 <TR> 359 <TD class="rowtitle">End time</TD> 360 <TD> 361 <xsl:value-of select="TestResult/@endtime"/> 362 </TD> 363 </TR> 364 <TR> 365 <TD class="rowtitle">Tests Passed</TD> 366 <TD> 367 <xsl:value-of select="TestResult/Summary/@pass"/> 368 </TD> 369 </TR> 370 <TR> 371 <TD class="rowtitle">Tests Failed</TD> 372 <TD> 373 <xsl:value-of select="TestResult/Summary/@failed"/> 374 </TD> 375 </TR> 376 <TR> 377 <TD class="rowtitle">Tests Timed out</TD> 378 <TD> 379 <xsl:value-of select="TestResult/Summary/@timeout"/> 380 </TD> 381 </TR> 382 <TR> 383 <TD class="rowtitle">Tests Not Executed</TD> 384 <TD> 385 <xsl:value-of select="TestResult/Summary/@notExecuted"/> 386 </TD> 387 </TR> 388 </TABLE> 389 </DIV> 390 391 <!-- High level summary of test execution --> 392 <h2 align="center">Test Summary by Package</h2> 393 <DIV> 394 <TABLE class="testsummary"> 395 <TR> 396 <TH>Test Package</TH> 397 <TH>Passed</TH> 398 <TH>Failed</TH> 399 <TH>Timed Out</TH> 400 <TH>Not Executed</TH> 401 <TH>Total Tests</TH> 402 </TR> 403 <xsl:for-each select="TestResult/TestPackage"> 404 <TR> 405 <TD> 406 <xsl:variable name="href"><xsl:value-of select="@appPackageName"/></xsl:variable> 407 <a href="#{$href}"><xsl:value-of select="@appPackageName"/></a> 408 </TD> 409 <TD> 410 <xsl:value-of select="count(TestSuite//Test[@result = 'pass'])"/> 411 </TD> 412 <TD> 413 <xsl:value-of select="count(TestSuite//Test[@result = 'fail'])"/> 414 </TD> 415 <TD> 416 <xsl:value-of select="count(TestSuite//Test[@result = 'timeout'])"/> 417 </TD> 418 <TD> 419 <xsl:value-of select="count(TestSuite//Test[@result = 'notExecuted'])"/> 420 </TD> 421 <TD> 422 <xsl:value-of select="count(TestSuite//Test)"/> 423 </TD> 424 </TR> 425 </xsl:for-each> <!-- end package --> 426 </TABLE> 427 </DIV> 428 429 <xsl:call-template name="filteredResultTestReport"> 430 <xsl:with-param name="header" select="'Test Failures'" /> 431 <xsl:with-param name="resultFilter" select="'fail'" /> 432 </xsl:call-template> 433 434 <xsl:call-template name="filteredResultTestReport"> 435 <xsl:with-param name="header" select="'Test Timeouts'" /> 436 <xsl:with-param name="resultFilter" select="'timeout'" /> 437 </xsl:call-template> 438 439 <h2 align="center">Detailed Test Report</h2> 440 <xsl:call-template name="detailedTestReport" /> 441 442 </body> 443 </html> 444 </xsl:template> 445 446 <xsl:template name="filteredResultTestReport"> 447 <xsl:param name="header" /> 448 <xsl:param name="resultFilter" /> 449 <xsl:variable name="numMatching" select="count(TestResult/TestPackage/TestSuite//TestCase/Test[@result=$resultFilter])" /> 450 <xsl:if test="$numMatching > 0"> 451 <h2 align="center"><xsl:value-of select="$header" /> (<xsl:value-of select="$numMatching"/>)</h2> 452 <xsl:call-template name="detailedTestReport"> 453 <xsl:with-param name="resultFilter" select="$resultFilter"/> 454 </xsl:call-template> 455 </xsl:if> 456 </xsl:template> 457 458 <xsl:template name="detailedTestReport"> 459 <xsl:param name="resultFilter" /> 460 <DIV> 461 <xsl:for-each select="TestResult/TestPackage"> 462 <xsl:if test="$resultFilter='' 463 or count(TestSuite//TestCase/Test[@result=$resultFilter]) > 0"> 464 465 <TABLE class="testdetails"> 466 <TR> 467 <TD class="package" colspan="3"> 468 <xsl:variable name="href"><xsl:value-of select="@appPackageName"/></xsl:variable> 469 <a name="{$href}">Compatibility Test Package: <xsl:value-of select="@appPackageName"/></a> 470 </TD> 471 </TR> 472 473 <TR> 474 <TH width="30%">Test</TH> 475 <TH width="5%">Result</TH> 476 <TH>Details</TH> 477 </TR> 478 479 <!-- test case --> 480 <xsl:for-each select="TestSuite//TestCase"> 481 482 <xsl:if test="$resultFilter='' or count(Test[@result=$resultFilter]) > 0"> 483 <!-- emit a blank row before every test suite name --> 484 <xsl:if test="position()!=1"> 485 <TR><TD class="testcasespacer" colspan="3"></TD></TR> 486 </xsl:if> 487 488 <TR> 489 <TD class="testcase" colspan="3"> 490 <xsl:for-each select="ancestor::TestSuite"> 491 <xsl:if test="position()!=1">.</xsl:if> 492 <xsl:value-of select="@name"/> 493 </xsl:for-each> 494 <xsl:text>.</xsl:text> 495 <xsl:value-of select="@name"/> 496 </TD> 497 </TR> 498 </xsl:if> 499 500 <!-- test --> 501 <xsl:for-each select="Test"> 502 <xsl:if test="$resultFilter='' or $resultFilter=@result"> 503 <TR> 504 <TD class="testname"> -- <xsl:value-of select="@name"/></TD> 505 506 <!-- test results --> 507 <xsl:choose> 508 <xsl:when test="string(@KnownFailure)"> 509 <!-- "pass" indicates the that test actually passed (results have been inverted already) --> 510 <xsl:if test="@result='pass'"> 511 <TD class="pass"> 512 <div style="text-align: center; margin-left:auto; margin-right:auto;"> 513 known problem 514 </div> 515 </TD> 516 <TD class="failuredetails"></TD> 517 </xsl:if> 518 519 <!-- "fail" indicates that a known failure actually passed (results have been inverted already) --> 520 <xsl:if test="@result='fail'"> 521 <TD class="failed"> 522 <div style="text-align: center; margin-left:auto; margin-right:auto;"> 523 <xsl:value-of select="@result"/> 524 </div> 525 </TD> 526 <TD class="failuredetails"> 527 <div class="details"> 528 A test that was a known failure actually passed. Please check. 529 </div> 530 </TD> 531 </xsl:if> 532 </xsl:when> 533 534 <xsl:otherwise> 535 <xsl:if test="@result='pass'"> 536 <TD class="pass"> 537 <div style="text-align: center; margin-left:auto; margin-right:auto;"> 538 <xsl:value-of select="@result"/> 539 </div> 540 </TD> 541 <TD class="failuredetails"> 542 <div class="details"> 543 <ul> 544 <xsl:for-each select="Details/ValueArray/Value"> 545 <li><xsl:value-of select="."/></li> 546 </xsl:for-each> 547 </ul> 548 </div> 549 </TD> 550 </xsl:if> 551 552 <xsl:if test="@result='fail'"> 553 <TD class="failed"> 554 <div style="text-align: center; margin-left:auto; margin-right:auto;"> 555 <xsl:value-of select="@result"/> 556 </div> 557 </TD> 558 <TD class="failuredetails"> 559 <div class="details"> 560 <xsl:value-of select="FailedScene/@message"/> 561 </div> 562 </TD> 563 </xsl:if> 564 565 <xsl:if test="@result='timeout'"> 566 <TD class="timeout"> 567 <div style="text-align: center; margin-left:auto; margin-right:auto;"> 568 <xsl:value-of select="@result"/> 569 </div> 570 <TD class="failuredetails"></TD> 571 </TD> 572 </xsl:if> 573 574 <xsl:if test="@result='notExecuted'"> 575 <TD class="notExecuted"> 576 <div style="text-align: center; margin-left:auto; margin-right:auto;"> 577 <xsl:value-of select="@result"/> 578 </div> 579 </TD> 580 <TD class="failuredetails"></TD> 581 </xsl:if> 582 </xsl:otherwise> 583 </xsl:choose> 584 </TR> <!-- finished with a row --> 585 </xsl:if> 586 </xsl:for-each> <!-- end test --> 587 </xsl:for-each> <!-- end test case --> 588 </TABLE> 589 </xsl:if> 590 </xsl:for-each> <!-- end test package --> 591 </DIV> 592 </xsl:template> 593 594 <!-- Take a delimited string and insert line breaks after a some number of elements. --> 595 <xsl:template name="formatDelimitedString"> 596 <xsl:param name="string" /> 597 <xsl:param name="numTokensPerRow" select="10" /> 598 <xsl:param name="tokenIndex" select="1" /> 599 <xsl:if test="$string"> 600 <!-- Requires the last element to also have a delimiter after it. --> 601 <xsl:variable name="token" select="substring-before($string, ';')" /> 602 <xsl:value-of select="$token" /> 603 <xsl:text> </xsl:text> 604 605 <xsl:if test="$tokenIndex mod $numTokensPerRow = 0"> 606 <br /> 607 </xsl:if> 608 609 <xsl:call-template name="formatDelimitedString"> 610 <xsl:with-param name="string" select="substring-after($string, ';')" /> 611 <xsl:with-param name="numTokensPerRow" select="$numTokensPerRow" /> 612 <xsl:with-param name="tokenIndex" select="$tokenIndex + 1" /> 613 </xsl:call-template> 614 </xsl:if> 615 </xsl:template> 616 617 </xsl:stylesheet> 618