Package qm :: Package test :: Package classes :: Module xml_result_stream :: Class XMLResultStream
[hide private]
[frames] | no frames]

Class XMLResultStream

source code

                 object --+            
                          |            
        extension.Extension --+        
                              |        
     result_stream.ResultStream --+    
                                  |    
file_result_stream.FileResultStream --+
                                      |
                                     XMLResultStream

An 'XMLResultStream' writes out results as XML.

An 'XMLResultStream' writes out results as XML. This stream is used to write out QMTest results files. The DTD is designed in such a way that if QMTest is terminated in the middle of a test run, the file will still be nearly valid, as long as the interruption did not occur in the midst of writing out an individual result. The closing tag for the results file will be missing.

Nested Classes [hide private]

Inherited from extension.Extension: Type, __metaclass__

Instance Methods [hide private]
 
__init__(self, arguments=None, **args)
Construct a new 'Extension'.
source code
 
WriteAnnotation(self, key, value)
Output an annotation for this run.
source code
 
WriteResult(self, result)
Output a test result.
source code
 
Summarize(self)
Output summary information about the results.
source code

Inherited from result_stream.ResultStream: WriteAllAnnotations

Inherited from extension.Extension: GetClassName, GetExplicitArguments, MakeDomDocument, MakeDomElement, Write, __getattr__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]

Inherited from file_result_stream.FileResultStream: arguments, file, filename

Inherited from result_stream.ResultStream: expected_outcomes, kind

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, arguments=None, **args)
(Constructor)

source code 

Construct a new 'Extension'.

'args': Keyword arguments providing values for Extension parameters. The values should be appropriate for the corresponding fields. Derived classes must pass along any unrecognized keyword arguments to this method so that additional arguments can be added in the future without necessitating changes to derived classes.

This method will place all of the arguments into this objects instance dictionary.

Derived classes may override this method, but should call this method during their processing.

Overrides: object.__init__
(inherited documentation)

WriteAnnotation(self, key, value)

source code 

Output an annotation for this run.

Subclasses should override this if they want to store/display annotations; the default implementation simply discards them.

'key' -- the key value as a string.

'value' -- the value of this annotation as a string.

Overrides: result_stream.ResultStream.WriteAnnotation
(inherited documentation)

WriteResult(self, result)

source code 

Output a test result.

Subclasses must override this method; the default implementation raises a 'NotImplementedError'.

'result' -- A 'Result'.

Overrides: result_stream.ResultStream.WriteResult
(inherited documentation)

Summarize(self)

source code 

Output summary information about the results.

When this method is called, the test run is complete. Summary information should be displayed for the user, if appropriate. Any finalization, such as the closing of open files, should also be performed at this point.

Derived class methods may override this method. They should, however, invoke this version before returning.

Overrides: result_stream.ResultStream.Summarize
(inherited documentation)