::xounit
Class RunSuiteContinuous

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

Variables
NameDefault ValueClassComment
currentTestMethod    ::xounit::TestCase
 name of the currently running test method.
delay    ::xounit::RunSuiteContinuous
 
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::RunSuiteContinuous
 suite file to load tests from
times    ::xounit::RunSuiteContinuous
 
 
Methods
NameComment
done {}   Is this test suite completed?
init {suiteFile args}  
runTestApplication {}   Main method for the RunSuiteContinuous Application
sleep {}   Wait for delay minutes
   
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

done

Description:
 Is this test suite completed?
Code:
  ::xounit::RunSuiteContinuous instproc done {}  {
   

        if { [ my times ] == 0 } {
            return 1
        }

        return 0
    
}

init

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

        my suite $suiteFile
        my runTestApplication 
        #my printResults
    
}

runTestApplication

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

        my instvar suite otherArgs

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

        my times [ $testSuite times ]
        my delay [ $testSuite delay ]
        set pwd [ pwd ]

        while { ![ my done ] } {

            my incr times -1

            cd $pwd

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

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

            $testSuite runSuite

            $testSuite writeWebResults [ $testSuite results ]

            if { ! [ my done ] } {
                $testSuite reloadPackages
                $testSuite closeFileChannels
                ::xox::GarbageCollector destroyAllObjects
                my sleep
            }
        }
    
}

sleep

Description:
 Wait for delay minutes.
Code:
  ::xounit::RunSuiteContinuous instproc sleep {}  {
   

        after [ expr {  [ my delay ] * 1000 * 60 } ]
    
}