Table of Contents

Class: ResultStream qm/test/result_stream.py

A ResultStream displays test results.

A ResultStream is responsible for displaying test results for the user as they arrive. It may also display summary information when the results are complete. The ResultStream may also choose to write the results to a file for permanent storage.

ResultStream is an abstract class.

QMTest does not presently have a mechanism for extension in this area. However, in a future release of QMTest, you will be able to define your own ResultStream. A typical reason to extend ResultStream would be to write out test results in alternative file format.

Base Classes   
qm.extension.Extension
Methods   
Summarize
WriteAllAnnotations
WriteAnnotation
WriteResult
  Summarize 
Summarize ( self )

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.

  WriteAllAnnotations 
WriteAllAnnotations ( self,  annotations )

Output all annotations in annotations to this stream.

Currently this is the same as making repeated calls to WriteAnnotation, but in the future, as special annotation types like timestamps are added, this will do the work of dispatching to functions like WriteTimestamp.

Should not be overridden by subclasses.

  WriteAnnotation 
WriteAnnotation (
        self,
        key,
        value,
        )

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.
  WriteResult 
WriteResult ( self,  result )

Output a test result.

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

result
A Result.
Exceptions   
NotImplementedError

Table of Contents

This document was automatically generated on Mon Jan 3 09:42:29 2005 by HappyDoc version 2.1