::xounit
Class PrintResults

Heritage:
::xotcl::Object
  |
  +--::xox::Node
        |
        +--::xounit::Test
              |
              +--::xounit::Assert
                    |
                    +--::xounit::TestCase
                          |
                          +--::xounit::Application
Class PrintResults
superclass ::xounit::Application,
Print results is an application that loads test results
 from testResults.xml and prints them in human readable 
 format.
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  testResults.xml  ::xounit::Application
 The test results file to load
suite  suite.xml  ::xounit::PrintResults
 The suite file used to create the results
 
Methods
NameComment
init {}   Print the results to the screen from a testResults
   
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:
 Print the results to the screen from a testResults.xml file.

 This loads the testResults.xml file with XmlNodeReader and
 then prints the results with TestResultsTextFormatter.

 Optionally the suite.xml file is loaded, but it doesnt really
 matter if it loads or not.
Overrides:
init in ::xotcl::Object
Code:
  ::xounit::PrintResults instproc init {}  {
   

        my instvar suite results

        set reader [ ::xox::XmlNodeReader new ]
        set formatter [ ::xounit::TestResultsTextFormatter new ]

        set testSuite [ ::xounit::TestSuite new ]

        catch { 

            $reader buildTree $testSuite $suite 
            $reader lappend externalRootNodes $testSuite
        }

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

        $reader buildTree $root $results

        $formatter printResults [ $root results ]
    
}