]> source.dussan.org Git - sonarqube.git/commitdiff
Revert "SONAR-5034 Remove useless measures from the "Unit Test Coverage" widget"
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Fri, 14 Feb 2014 13:15:03 +0000 (14:15 +0100)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Fri, 14 Feb 2014 13:15:03 +0000 (14:15 +0100)
This reverts commit c8de210259f0c3c05c98201c342691e8627a8609.

plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties
plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/coverage.html.erb

index 17833f2d118033141d3d5a033a5a8259be323e03..e44bd3f9e68d63214fe6f4365d5bc7c5316c4e98 100644 (file)
@@ -1006,7 +1006,7 @@ widget.code_coverage.line_coverage.suffix=\ line coverage
 widget.code_coverage.branch_coverage.suffix=\ branch coverage
 widget.code_coverage.on_new_code=On new code
 widget.code_coverage.no_new_lines_to_cover=No new lines to cover
-widget.code_coverage.unit_test=Unit test
+widget.code_coverage.test_success=Unit test success
 widget.code_coverage.failures.suffix=\ failures
 widget.code_coverage.errors.suffix=\ errors
 widget.code_coverage.tests.suffix=\ tests
index e468f8d60c0b64d9c4cfb297a3bea3b18e1c94b9..49c84541229970107fc6f3b2a731b104eff0d0b4 100644 (file)
@@ -1,6 +1,8 @@
 <%
   code_coverage_measure=measure('coverage')
   tests_measure=measure('tests')
+  execution_time=measure('test_execution_time')
+  success_percentage=measure('test_success_density')
 
   if code_coverage_measure || tests_measure
 %>
   if tests_measure
   %>
   <div class="dashbox">
-      <h3><%= message('widget.code_coverage.unit_test') -%></h3>
+      <h3><%= message('widget.code_coverage.test_success') -%></h3>
+      <p><span class="big">
+        <%= format_measure(success_percentage, :suffix => '', :url => url_for_drilldown(success_percentage)) %></span>
+        <%= dashboard_configuration.selected_period? ? format_variation(success_percentage) : trend_icon(success_percentage) -%>
+      </p>
+      <p>
+        <%= format_measure(Metric::TEST_FAILURES, :suffix => message('widget.code_coverage.failures.suffix'), :url => url_for_drilldown(Metric::TEST_FAILURES)) %>
+        <%= dashboard_configuration.selected_period? ? format_variation(Metric::TEST_FAILURES) : trend_icon(Metric::TEST_FAILURES) -%>
+      </p>
+      <p>
+        <%= format_measure(Metric::TEST_ERRORS, :suffix => message('widget.code_coverage.errors.suffix'), :url => url_for_drilldown(Metric::TEST_ERRORS)) %>
+        <%= dashboard_configuration.selected_period? ? format_variation(Metric::TEST_ERRORS) : trend_icon(Metric::TEST_ERRORS) -%>
+      </p>
       <p>
         <%= format_measure(tests_measure, :suffix => message('widget.code_coverage.tests.suffix'), :url => url_for_drilldown('tests')) %>
         <%= dashboard_configuration.selected_period? ? format_variation(tests_measure) : trend_icon(tests_measure) -%>
         <%= dashboard_configuration.selected_period? ? format_variation(skipped_measure) : trend_icon(skipped_measure) -%>
       </p>
       <% end %>
+      <p>
+        <%= format_measure(execution_time, :suffix => '', :url => url_for_drilldown('test_execution_time')) %>
+        <%= dashboard_configuration.selected_period? ? format_variation(execution_time) : trend_icon(execution_time) -%>
+      </p>
   </div>
   <% end %>
 </td>