::xounit
Class RunSuite

Heritage:
::xotcl::Object
  |
  +--::xox::Node
        |
        +--::xounit::Test
              |
              +--::xounit::Assert
                    |
                    +--::xounit::TestCase
                          |
                          +--::xounit::Application
Class RunSuite
superclass ::xounit::Application,

Variables
NameDefault ValueClassComment
currentTestMethod    ::xounit::TestCase
 name of the currently running test method.
formatterClass  ::xounit::TestResultsTextFormatter  ::xounit::Application
 test results formatter used to display results of application
name  Application  ::xounit::Application
 the name of the Application
nodeName    ::xox::Node
 
result    ::xounit::TestCase
 the result for the current run.
results  ""  ::xounit::Application
 failures, errors, and passes from Application execution
suite    ::xounit::RunSuite
 suite file to load tests from
 
Methods
NameComment
init {args}  
runTestApplication {}   Main method for the RunSuite Application
   
Methods from ::xounit::Application
printResults, runApplication, runApplicationAndReport,
   
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

init

Description:
 
Arguments:
Overrides:
init in ::xotcl::Object
Code:
  ::xounit::RunSuite instproc init {args}  {
   

        my set suite $args
        my runApplication runTestApplication 
        my printResults
    
}

runTestApplication

Description:
 Main method for the RunSuite Application.
Code:
  ::xounit::RunSuite instproc runTestApplication {}  {
   

        my instvar suite 

        set testSuite [ ::xounit::TestSuite new ]
        set reader [ ::xox::XmlNodeReader new ]
        $reader buildTree $testSuite $suite

        #my debug [[ ::xox::XmlNodeWriter new ] generateXml $testSuite ]

        $testSuite runSuite

        set root [ ::xounit::TestResult new -name [ $testSuite name ] ]

        foreach result [ $testSuite results ] {

            $root copyNewNode $result
        }

        set writer [ ::xox::SimpleXmlNodeWriter new ]

        $writer writeXmlFile $root testResults.xml 

        my results [ concat [ $testSuite results ] [ my results ] ]
    
}