/testability-explorer/src/main/resources/com/google/test/metric/report/html/Report.html

http://testability-explorer.googlecode.com/ · HTML · 101 lines · 87 code · 12 blank · 2 comment · 0 complexity · f8916fa1ef7505aa6b2bde8f5db7e49b MD5 · raw file

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
  2. "http://www.w3.org/TR/html4/strict.dtd">
  3. <html lang="en">
  4. <head>
  5. <#include "../costDetailBox.html" />
  6. <title>${message("report.title")}</title>
  7. <link href="../te.css" rel="stylesheet" type="text/css">
  8. <style type="text/css">
  9. <#include "../te.css"/>
  10. </style>
  11. <script type="text/javascript">
  12. <#include "report.js"/>
  13. </script>
  14. </head>
  15. <body>
  16. <h1>${message("report.title")}</h1>
  17. <div id="timestamp">
  18. ${message("report.timestamp", now)}
  19. </div>
  20. <div style="margin-top: 32px;">
  21. <div style="padding-bottom: 24px; font-weight: bold; font-size: 120%">Overall score:
  22. <span style="font-weight: normal">${overall}</span></div>
  23. <div style="float: left;">
  24. ${pieChart}
  25. </div>
  26. <div style="float: left;">
  27. ${overallChart}
  28. </div>
  29. <div class="overview">
  30. <#if total gt 0>
  31. <table class="overview_table">
  32. <tr>
  33. <th>Analyzed classes</th>
  34. <th class="value">${total}</th>
  35. <th class="percent">&nbsp;</th>
  36. </tr>
  37. <tr>
  38. <td> - Excellent</td>
  39. <td class="value">${excellentCount}</td>
  40. <td class="percent">${(excellentCount / total)?string.percent}</td>
  41. </tr>
  42. <tr>
  43. <td> - Good</td>
  44. <td class="value">${goodCount}</td>
  45. <td class="percent">${(goodCount / total)?string.percent}</td>
  46. </tr>
  47. <tr>
  48. <td> - Needs work</td>
  49. <td class="value">${needsWorkCount}</td>
  50. <td class="percent">${(needsWorkCount / total)?string.percent}</td>
  51. </tr>
  52. </table>
  53. <#else/>
  54. Total score is zero - were any classes analyzed??
  55. </#if>
  56. </div>
  57. <div style="clear:both; width: 0">&nbsp;</div>
  58. </div>
  59. <div style="margin-bottom: 32px; margin-left: 32px; margin-top: 16px;">
  60. ${histogram}
  61. </div>
  62. <h2 style="margin-bottom: 12px;">Issues that cause the most untestable classes</h2>
  63. <#list worstOffenders as classIssues>
  64. <div class="classExplanation">
  65. <#assign numConstructionIssues = classIssues.constructionIssues?keys?size />
  66. <#assign numCollaboratorIssues = classIssues.collaboratorIssues?keys?size />
  67. <#assign numDirectCostIssues = classIssues.directCostIssues?keys?size />
  68. <div class="cost">Cost: ${classIssues.totalCost}</div>
  69. <p class="header">${message("report.explain.class.hardToTest", "<tt>", classIssues.className, "</tt>")} </p>
  70. <#if numConstructionIssues != 0>
  71. <p class="issueType header">${message("report.explain.class.construction")}</p>
  72. <@costDetailBox classIssues.constructionIssues "construction"/>
  73. </#if>
  74. <#if numCollaboratorIssues != 0>
  75. <p class="issueType header">${message("report.explain.class.collaborator")}</p>
  76. <@costDetailBox classIssues.collaboratorIssues "collaborator" />
  77. </#if>
  78. <#if numDirectCostIssues != 0>
  79. <p class="issueType header">${message("report.explain.class.directCost")}</p>
  80. <@costDetailBox classIssues.directCostIssues "directCost" />
  81. </#if>
  82. <!--input type="button" value="Show more suggestions"/><br/-->
  83. <!--p>${message("report.explain.class.benefits", "<b>", 0.00, "</b>")}</p-->
  84. </div>
  85. </#list>
  86. <div class="copyright">
  87. <a href="http://testabilityexplorer.org">http://testabilityexplorer.org</a></div>
  88. </body>
  89. </html>