Package pysys :: Package writer
[hide private]
[frames] | no frames]

Package writer

source code

Contains implementations of test output summary writers used to output test results during runtime execution.

There are currently four implementations of writers distributed with the PySys framework, namely the writer.TextResultsWriter, the writer.XMLResultsWriter, the writer.JUnitXMLResultsWriter and the writer.CSVResultsWriter. Project configuration of the writers is through the PySys project file using the <writer> tag - multiple writers may be configured and their individual properties set through the nested <property> tag. Writer properties are set as attributes to the class through the setattr() function. Custom (site specific) modules can be created and configured by users of the PySys framework (e.g. to output test results into a relational database etc), though they must adhere to the interface demonstrated by the implementations demonstrated here.

The writers are instantiated and invoked by the pysys.baserunner.BaseRunner class instance. This calls the class constructors of all configured test writers, and then the setup (prior to executing the set of tests), processResult (process a test result), and cleanup (upon completion of the execution of all tests). The **kwargs method parameter is used for variable argument passing in the interface methods to allow modification of the PySys framework without breaking writer implementations already in existence. Currently the pysys.baserunner.BaseRunner includes numTests in the call to the setup action (the number of tests to be executed), and cycle in the call to the processResult action (the cycle number when iterations through the same set of tests was requested).

Classes [hide private]
  flushfile
Class to flush on each write operation.
  TextResultsWriter
Class to log results to logfile in text format.
  XMLResultsWriter
Class to log results to logfile in XML format.
  JUnitXMLResultsWriter
Class to log test results in Apache Ant JUnit XML format (one output file per test per cycle).
  CSVResultsWriter
Class to log results to logfile in CSV format.
Variables [hide private]
  __package__ = 'pysys.writer'