|
||||||
| SUMMARY: CHILDREN | PARAMETER | INSTPROC | INSTFILTER | INSTFORWARD | DETAIL: | INSTPROC | |||||
::xotcl::Object
|
+--::xounit::Test
|
+--::xox::Node
TestSuite is a test runner that will run all tests that are children of this node.
| Variables | |||
| Name | Default Value | Class | Comment |
nodeName |
::xox::Node | ||
packages |
"" | ::xounit::TestSuite | The packages to reload before a test |
results |
"" | ::xounit::TestSuite | The results from running this TestSuite |
| Methods | |
| Name | Comment |
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 |
Runs this TestSuite as a single test.
testResult ::xounit::TestSuite instproc run {testResult} {
my results {}
my runSuite
$testResult lappend results [ my results ]
}
Runs all the child tests of this test suite and records the test results on this TestSuite in the results parameter.
::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
}
}
Returns the tests that are children of this TestSuite. This is usually built with suite.xml files.
::xounit::TestSuite instproc tests {} {
return [ ::xox::removeIfNot { $node hasclass ::xounit::Test } node [ my nodes ] ]
}