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

Class XMLResultsWriter

source code

Class to log results to logfile in XML format.

The class creates a DOM document to represent the test output results and writes the DOM to the logfile using toprettyxml(). The outputDir, stylesheet, useFileURL attributes of the class can be over-ridden in the PySys project file using the nested <property> tag on the <writer> tag.

Instance Methods [hide private]
 
__init__(self, logfile)
Create an instance of the TextResultsWriter class.
source code
 
setup(self, **kwargs)
Implementation of the setup method.
source code
 
cleanup(self, **kwargs)
Implementation of the cleanup method.
source code
 
processResult(self, testObj, **kwargs)
Implementation of the processResult method.
source code
 
__createResultsNode(self) source code
 
__pathToURL(self, path) source code
Instance Variables [hide private]
string outputDir = None
Path to output directory to write the test summary files
string stylesheet = 'c:\\apama_build\\apama-lib3\\win\\amd64\\all\\py...
Path to the XSL stylesheet
string (true | false) useFileURL = 'false'
Indicates if full file URLs are to be used for local resource references
Method Details [hide private]

__init__(self, logfile)
(Constructor)

source code 

Create an instance of the TextResultsWriter class.

Parameters:
  • logfile - The filename template for the logging of test results

setup(self, **kwargs)

source code 

Implementation of the setup method.

Creates the DOM for the test output summary and writes to logfile.

Parameters:
  • kwargs - Variable argument list

cleanup(self, **kwargs)

source code 

Implementation of the cleanup method.

Updates the test run status in the DOM, and re-writes to logfile.

Parameters:
  • kwargs - Variable argument list

processResult(self, testObj, **kwargs)

source code 

Implementation of the processResult method.

Adds the results node to the DOM and re-writes to logfile.

Parameters:

Instance Variable Details [hide private]

stylesheet

Path to the XSL stylesheet
Type:
string
Value:
'c:\\apama_build\\apama-lib3\\win\\amd64\\all\\python\\2.7.13\\Lib\\si\
te-packages\\pysys-log.xsl'