::xounit
Class TestSuite

Heritage:
::xotcl::Object
  |
  +--::xounit::Test
        |
        +--::xox::Node
Direct Known Subclasses:
::xounit::TestSuiteContinuous,

Associated Test:
::xounit::test::TestTestSuite

Class TestSuite
superclass ::xox::Node,::xounit::Test,
TestSuite is a test runner that will run all tests
 that are children of this node.
Variables
NameDefault ValueClassComment
nodeName    ::xox::Node
 
packages  ""  ::xounit::TestSuite
 The packages to reload before a test
results  ""  ::xounit::TestSuite
 The results from running this TestSuite
 
Methods
NameComment
run {testResult}   Runs this TestSuite as a single test
runSuite {}   Runs all the child tests of this test suite and records the test results on this TestSuite in the results parameter
tests {}   Returns the tests that are children of this TestSuite
   
Methods from ::xotcl::Object
#, ., ?, ?code, ?methods, ?object, abstract, copy, coverageFilter, defaultmethod, extractConfigureArg, filterappend, garbageCollect, get#, getClean#, hasclass, init, methodTag, mixinappend, move, profileFilter, self, setParameterDefaults, shell, tclcmd, traceFilter,
 
Instproc Detail

run

Description:
 Runs this TestSuite as a single test.
Arguments:
Overrides:
run in ::xounit::Test
Code:
  ::xounit::TestSuite instproc run {testResult}  {
   

        my results {}

        my runSuite

        $testResult lappend results [ my results ]
    
}

runSuite

Description:
 Runs all the child tests of this test suite and
 records the test results on this TestSuite in 
 the results parameter.
Code:
  ::xounit::TestSuite instproc runSuite {}  {
   

        my results {}

        foreach testCase [ my tests ] {

            set testClass [ $testCase info class ]

            cd [ [ $testClass getPackage ] packagePath ]

            set result [ $testCase newResult ]
            $testCase run $result
            my lappend results $result
        }
    
}

tests

Description:
 Returns the tests that are children of this TestSuite.
 This is usually built with suite.xml files.
Code:
  ::xounit::TestSuite instproc tests {}  {
   

        return [ ::xox::removeIfNot  { $node hasclass ::xounit::Test } node [ my nodes ] ]
    
}