quickSelfTest/SelfTest.st
author Claus Gittinger <cg@exept.de>
Fri, 05 Aug 2011 16:27:08 +0200
changeset 29 fea749c05791
parent 27 09411309837d
child 33 834083803fbb
permissions -rw-r--r--
*** empty log message ***

"/
"/ execute this script using the following command line:
"/
"/ stx --noBanner -I --execute SelfTest.st
"/
"/ to use with jenkins (+ perfPublisher plugin):
"/ use the following buildscript (in jenkins):
"/ (after checkout of stx)
"/      cd stx
"/      call bmake
"/      cd goodies\selftest
"/      ..\..\projects\smalltalk\stx.com --noBanner -I --execute SelfTest.st
"/
"/ and configure the perfPublisher jenkins plugin, to scan for "testresult.xml"

Object infoPrinting:false.
ObjectMemory infoPrinting:false.
Processor activeProcess exceptionHandlerSet
    on:(Class updateChangeFileQuerySignal)
    do:[:ex | ex proceedWith:false ].
!

Stdout showCR:'Selftest Started'.
!

Stdout showCR:'Loading sunit...'.
Smalltalk loadPackage:'stx:goodies/sunit'.
self assert:(TestCase notNil and:[TestCase isLoaded]).

"/ Smalltalk loadPackage:'stx:goodies/xml/vw'.
"/ Smalltalk loadPackage:'stx:goodies/xml/stx'.
!

|suite result|

Stdout showCR:'Creating suite...'.
suite := TestSuite named:'SelfTest'.

Stdout showCR:'Loading regression tests...'.
#(
    'AssociationTests'
    "/ 'BinaryIOTests'
    'BinaryTreeTester'
    "/ 'BlockTest'
    'CharacterTests'
    'CollectionTests'
    "/ 'CompilerTest'
    'ComplexTest'
    "/ 'DebuggerTest'
    "/ 'DeepCopyTests'
    "/ 'DelayTest'
    "/ 'DictionaryTest'
    "/ 'EnumerationTests'
    "/ 'ExceptionTest'
    "/ 'ExternalInterfaceTests'
    "/ 'FileOpenTest'
    "/ 'FileStreamTest'
    "/ 'FloatTest'
    "/ 'FractionTest'
    "/ 'FractionTest'
    "/ 'GCTest'
    "/ 'GraphicDrawingTest'
    "/ 'HTMLParserTests'
    "/ 'ImageReaderTest'
    "/ 'IntegerTest'
    "/ 'JavaScriptTests'
    "/ 'MeasurementValueTests'
    "/ 'MemoryTest'
    'NumberTest'
    "/ 'ParserTest'
    "/ 'ScaledDecimalTest'
    "/ 'SemaphoreTest'
    "/ 'SharedQueueTest'
    'SmallIntegerTest'
    "/ 'SortTests'
    "/ 'StringTests'
    "/ 'TimeAndDateTest'
    "/ 'TimeDurationTest'
    "/ 'URLTest'
    "/ 'XMLCoderTests'
    "/ 'ZipArchiveTests'
) do:[:className |
    |fullName|

    fullName := ('RegressionTests::',className).
    Stdout showCR:('Loading ',className,'...').
    Smalltalk fileInClass:fullName package:'exept:regression'.
    suite addTest:(Smalltalk classNamed:fullName) suite.
].

Stdout showCR:'Running suite...'.
result := suite
	    runBeforeEachDo:[:test |
		Stdout showCR:('- running ',test printString).
	    ].

TestResultReporter
    report:result
    format:#xml_jUnit
    as:'testresult.xml'.
!