--- a/TestResultReporter.st Tue Aug 02 18:14:47 2011 +0200
+++ b/TestResultReporter.st Tue Aug 02 18:17:49 2011 +0200
@@ -65,7 +65,7 @@
[exBegin]
|testResult|
- testResult := RegressionTests::IntegerTest suite run.
+ testResult := RegressionTests::CollectionTests suite run.
TestResultReporter report:testResult format:#xml_perfPublisher on:Transcript.
[exEnd]
"
@@ -446,11 +446,16 @@
executed='exec-status'
<result>
<success passed='result-status' state='result-state'/>
+ <errorlog><!![CDATA[EXEMPLE OF ERROR LOG]]></errorlog>
</result>
</test>
"
- | testClassName executionTime testName testDescription successPassed successState compilerName compilerVersion compilerConfiguration compilerVersionDate timeUnit timeMeasure sysInfo osType osVersion cpuType|
+ |testClassName executionTime testName testDescription
+ successPassed successState exceptionInfo
+ compilerName compilerVersion compilerConfiguration compilerVersionDate
+ timeUnit timeMeasure
+ sysInfo osType osVersion cpuType|
testClassName := self sunitNameOf: test class.
testName := test selector.
@@ -460,6 +465,11 @@
testDescription := '%1-%2' bindWith:testClassName with:testName.
successPassed := (testResult == #success) ifTrue:['yes'] ifFalse:['no'].
+ testResult ~~ #success ifTrue:[
+ exceptionInfo := test exceptionInfoString.
+self halt.
+ ].
+
successState := 'foo'.
"/ caveat: the following needs to be made dialect-specific
@@ -502,7 +512,15 @@
"/ 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:(' <executiontime unit="%1" mesure="%2" measure="%2" isRelevant="yes" />'
- bindWith:timeUnit with:timeMeasure);
+ bindWith:timeUnit with:timeMeasure).
+
+ exceptionInfo notNil ifTrue:[
+ stream
+ nextPutLine:' <errorlog><!![CDATA[';
+ nextPutAll:exceptionInfo;
+ nextPutLine:']]></errorlog>'.
+ ].
+ stream
nextPutLine:' </result>'.
"/
@@ -534,11 +552,11 @@
!TestResultReporter class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/goodies/sunit/TestResultReporter.st,v 1.13 2011-08-01 14:54:43 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/goodies/sunit/TestResultReporter.st,v 1.14 2011-08-02 16:17:49 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/goodies/sunit/TestResultReporter.st,v 1.13 2011-08-01 14:54:43 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/goodies/sunit/TestResultReporter.st,v 1.14 2011-08-02 16:17:49 cg Exp $'
!
version_SVN