::xounit
Class RunTests

Heritage:
::xotcl::Object
  |
  +--::xox::Node
        |
        +--::xounit::Test
              |
              +--::xounit::Assert
                    |
                    +--::xounit::TestCase
                          |
                          +--::xounit::Application
Class RunTests
superclass ::xounit::Application,
Application that finds and runs all unit tests
 in a package's test sub-package.

 If package is xounit then RunTests will find
 all TestCases in xounit::test and run them.
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
 
packages    ::xounit::RunTests
 packages to find and run tests in
result    ::xounit::TestCase
 the result for the current run.
results  ""  ::xounit::Application
 failures, errors, and passes from Application execution
 
Methods
NameComment
init {args}   Initializes RunTests to run all unit tests in the packages given in args
runTestApplication {}   Main method for the RunTests 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:
 Initializes RunTests to run all unit tests in the
 packages given in args.
Arguments:
Overrides:
init in ::xotcl::Object
Code:
  ::xounit::RunTests instproc init {args}  {
   

        my set packages $args
        my runApplication runTestApplication 
        my printResults
    
}

runTestApplication

Description:
 Main method for the RunTests Application.

 Selects tests by searching for subclasses
 of ::xounit::TestCase in package::test where
 package is specified on the command line.
Code:
  ::xounit::RunTests instproc runTestApplication {}  {
   

        my instvar packages 

        set aRunner [ ::xounit::TestRunner new ]

        foreach package $packages {

            package require "${package}"
            package require "${package}::test"
            puts "Loaded ${package}::test"
            puts "Running ::${package}"
            $aRunner runAllTests ::${package}::test
        }

        my results [ concat [ $aRunner results ] [ my results ] ]
    
}