|
||||||
| SUMMARY: CHILDREN | PARAMETER | INSTPROC | INSTFILTER | INSTFORWARD | DETAIL: | INSTPROC | |||||
::xotcl::Object
|
+--::xox::Node
|
+--::xounit::Test
|
+--::xounit::Assert
|
+--::xounit::TestCase
|
+--::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 | |||
| Name | Default Value | Class | Comment |
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 | |
| Name | Comment |
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 |
Initializes RunTests to run all unit tests in the packages given in args.
args ::xounit::RunTests instproc init {args} {
my set packages $args
my runApplication runTestApplication
my printResults
}
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.
::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 ] ]
}