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 3267a039308efa5
parent 325 3bd7d9ad8b3f
child 327 113031dfa759
Test report: print test execution time in result summary
reports/Builder__TestReport.st
     1.1 --- a/reports/Builder__TestReport.st	Mon Feb 13 12:00:51 2017 +0100
     1.2 +++ b/reports/Builder__TestReport.st	Thu Feb 23 13:36:24 2017 +0000
     1.3 @@ -239,8 +239,9 @@
     1.4  
     1.5  runReport
     1.6  
     1.7 -    | result |
     1.8 +    | result t0 t1 |
     1.9      result := Result new format:format.
    1.10 +    t0 := Timestamp now.
    1.11      coverage notNil ifTrue:[
    1.12          InstrumentationContext  run:[
    1.13              suite run:result.
    1.14 @@ -253,6 +254,8 @@
    1.15      ] ifFalse:[
    1.16          suite run:result.
    1.17      ].
    1.18 +    t1 := Timestamp now.
    1.19 +
    1.20      Transcript cr; cr.
    1.21  
    1.22      result failureOutcomes do:[:failureOutcome |
    1.23 @@ -268,10 +271,12 @@
    1.24      Transcript cr; cr.
    1.25      Transcript show: 'SUMMARY: '.
    1.26      result printOn: Transcript.
    1.27 +    Transcript show: ', test execution time '.
    1.28 +    (t1 - t0) printOn: Transcript.
    1.29      Transcript cr.
    1.30  
    1.31      "Created: / 04-08-2011 / 12:39:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    1.32 -    "Modified: / 28-05-2016 / 10:33:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    1.33 +    "Modified: / 23-02-2017 / 12:47:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    1.34  ! !
    1.35  
    1.36  !TestReport::Result methodsFor:'accessing'!