# HG changeset patch # User mawalch # Date 1520460849 -3600 # Node ID f50803f4bb599a51444e07dd0b217362a37e6299 # Parent 9d572c1caefa39743dbc822f549821b4128558d1 Send #countTests instead of #testCount diff -r 9d572c1caefa -r f50803f4bb59 reports/Builder__TestReportFormat.st --- a/reports/Builder__TestReportFormat.st Wed Oct 18 11:32:14 2017 +0200 +++ b/reports/Builder__TestReportFormat.st Wed Mar 07 23:14:09 2018 +0100 @@ -63,7 +63,7 @@ | stacktrace | exception isNil ifTrue:[ - stacktrace := nil. + stacktrace := nil. ] ifFalse:[ stacktrace := (String streamContents:[:s| @@ -71,7 +71,7 @@ ]) ]. - ^self writeTestCase: testcase outcome: outcome time: time exception: exception + ^self writeTestCase: testcase outcome: outcome time: time exception: exception stacktrace: stacktrace "Created: / 03-08-2011 / 19:44:34 / Jan Vrany " @@ -109,7 +109,7 @@ ]. s nextPutAll:'vars: '; cr. context vars keysAndValuesDo:[:idx :eachVar | - s nextPutAll:' '. idx printOn: s. s nextPutAll:': '. + s nextPutAll:' '. idx printOn: s. s nextPutAll:': '. eachVar isString ifTrue:[ eachVar storeOn: s. ] ifFalse:[ @@ -117,7 +117,7 @@ ]. s cr. ]. - s nextPutAll:'source: '; cr. + s nextPutAll:'source: '; cr. [ home := context methodHome. @@ -132,7 +132,7 @@ ^ self. ]. ] on: Error do:[:ex| - s + s nextPutAll: '** error when getting source: '; nextPutAll: ex description; nextPutAll: '**'; @@ -245,7 +245,7 @@ nextPutAll:''. "Now this is ugly. We want to update the time and the number of failures and errors, but still at the same time stream a valid XML. So remember this position and add some whitespace, that we can fill later." @@ -266,7 +266,7 @@ "/ stream "/ nextPutLine:(' 'bindWith:stx_libbasic versionString). stream - nextPutLine: ' '. + nextPutLine: ' '. startTime := OperatingSystem getMillisecondTime. @@ -356,10 +356,10 @@ writeCDATA: string | start stop | - start := 1. + start := 1. stop := start. [ (stop := (string indexOf: $] startingAt: stop)) ~~ 0 ] whileTrue:[ - ((stop < (string size - 1)) + ((stop < (string size - 1)) and:[(string at: stop + 1) == $] and:[(string at: stop + 2) == $>]]) ifTrue:[ " Okay, found CDATA end token " @@ -371,12 +371,12 @@ ]. ]. start < string size ifTrue:[ - stream nextPutAll: string startingAt: start to: string size. + stream nextPutAll: string startingAt: start to: string size. ]. " String streamContents:[:s | Builder::TestReportFormat::JUnit new report: nil stream: s; writeCDATA:'ABCD'] - String streamContents:[:s | Builder::TestReportFormat::JUnit new report: nil stream: s; writeCDATA:']]]]'] + String streamContents:[:s | Builder::TestReportFormat::JUnit new report: nil stream: s; writeCDATA:']]]]'] String streamContents:[:s | Builder::TestReportFormat::JUnit new report: nil stream: s; writeCDATA:'Some <[CDATA[ CDATA ]]> Some Text and stray terminator ]]> here'] " @@ -437,17 +437,17 @@ + - - + + " - |testClassName executionTime testName testDescription + |testClassName executionTime testName testDescription successPassed successState exceptionInfo - compilerName compilerVersion compilerConfiguration compilerVersionDate - timeUnit timeMeasure + compilerName compilerVersion compilerConfiguration compilerVersionDate + timeUnit timeMeasure sysInfo osType osVersion cpuType| testClassName := testcase printString. @@ -491,19 +491,19 @@ nextPutLine:(' ' bindWith:cpuType); "/ nextPutLine:(' unit="Mhz" cpufreq="%1" />' bindWith:cpuSpeed); nextPutLine:' '; - nextPutLine:(' ' - bindWith:compilerName with:compilerVersion + nextPutLine:(' ' + bindWith:compilerName with:compilerVersion with:compilerVersionDate with:compilerConfiguration); "/ nextPutLine:' '; nextPutLine:' '; nextPutLine:' '; - nextPutLine:(' ' + nextPutLine:(' ' bindWith:successPassed with:successState); "/ cg: in the perfPublisher documentation, I found "mesure". "/ I am not sure, if that was a typo, or is actually what is expected... "/ to be on the save side, I generate both a mesure and a measure attribute, "/ so it will work, even if they ever fix perfPublisher's xml parser. - nextPutLine:(' ' + nextPutLine:(' ' bindWith:timeUnit with:timeMeasure). exceptionInfo notNil ifTrue:[ @@ -571,26 +571,26 @@ testClassName := testcase class printString. - outcome result == TestResult statePass ifTrue:[ + outcome result == TestResult statePass ifTrue:[ result := #success. - ] ifFalse:[ - outcome result == TestResult stateFail ifTrue:[ + ] ifFalse:[ + outcome result == TestResult stateFail ifTrue:[ result := #failure. - ] ifFalse:[ - outcome result == TestResult stateError ifTrue:[ + ] ifFalse:[ + outcome result == TestResult stateError ifTrue:[ result := #error. - ] ifFalse:[ - outcome result == TestResult stateSkip ifTrue:[ + ] ifFalse:[ + outcome result == TestResult stateSkip ifTrue:[ result := #skip. ] ifFalse:[ self error: 'Invalid test result'. ] ]. ]. - ]. + ]. stream - nextPutAll:'" @@ -656,23 +656,23 @@ | result testDescription statusString | index := index + 1. - outcome result == TestResult statePass ifTrue:[ + outcome result == TestResult statePass ifTrue:[ result := #pass. - ] ifFalse:[ - outcome result == TestResult stateFail ifTrue:[ + ] ifFalse:[ + outcome result == TestResult stateFail ifTrue:[ result := #failure. - ] ifFalse:[ - outcome result == TestResult stateError ifTrue:[ + ] ifFalse:[ + outcome result == TestResult stateError ifTrue:[ result := #error. - ] ifFalse:[ - outcome result == TestResult stateSkip ifTrue:[ + ] ifFalse:[ + outcome result == TestResult stateSkip ifTrue:[ result := #skip. ] ifFalse:[ self error: 'Invalid test result'. ] ]. ]. - ]. + ]. testDescription := '%1-%2 (%3ms)' bindWith:testcase printString