Test report: print test execution time in result summary jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Thu, 23 Feb 2017 13:36:24 +0000
branchjv
changeset 326 7a039308efa5
parent 325 3bd7d9ad8b3f
child 327 113031dfa759
Test report: print test execution time in result summary
reports/Builder__TestReport.st
--- a/reports/Builder__TestReport.st	Mon Feb 13 12:00:51 2017 +0100
+++ b/reports/Builder__TestReport.st	Thu Feb 23 13:36:24 2017 +0000
@@ -239,8 +239,9 @@
 
 runReport
 
-    | result |
+    | result t0 t1 |
     result := Result new format:format.
+    t0 := Timestamp now.
     coverage notNil ifTrue:[
         InstrumentationContext  run:[
             suite run:result.
@@ -253,6 +254,8 @@
     ] ifFalse:[
         suite run:result.
     ].
+    t1 := Timestamp now.
+
     Transcript cr; cr.
 
     result failureOutcomes do:[:failureOutcome |
@@ -268,10 +271,12 @@
     Transcript cr; cr.
     Transcript show: 'SUMMARY: '.
     result printOn: Transcript.
+    Transcript show: ', test execution time '.
+    (t1 - t0) printOn: Transcript.
     Transcript cr.
 
     "Created: / 04-08-2011 / 12:39:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 28-05-2016 / 10:33:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 23-02-2017 / 12:47:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !TestReport::Result methodsFor:'accessing'!