pysys.writer.outcomes¶
Writers that record test outcomes to a variety of file formats.
TextResultsWriter¶
-
class
pysys.writer.outcomes.
TextResultsWriter
(logfile, **kwargs)[source]¶ Bases:
pysys.writer.api.BaseRecordResultsWriter
Class to log a summary of the results to a logfile in .txt format.
-
outputDir
= None¶ The directory to write the logfile, if an absolute path is not specified. The default is the working directory.
Project
${...}
properties can be used in the path.
-
XMLResultsWriter¶
-
class
pysys.writer.outcomes.
XMLResultsWriter
(logfile, **kwargs)[source]¶ Bases:
pysys.writer.api.BaseRecordResultsWriter
Class to log results to logfile in a single XML file.
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 overridden in the PySys project file using the nested <property> tag on the <writer> tag.
- Variables
outputDir (str) – Path to output directory to write the test summary files
stylesheet (str) – Path to the XSL stylesheet
useFileURL (str) – Indicates if full file URLs are to be used for local resource references
JUnitXMLResultsWriter¶
-
class
pysys.writer.outcomes.
JUnitXMLResultsWriter
(**kwargs)[source]¶ Bases:
pysys.writer.api.BaseRecordResultsWriter
Class to log test results in the widely-used Apache Ant JUnit XML format (one output file per test per cycle).
If you need to integrate with any CI provider that doesn’t have built-in support (e.g. Jenkins) this standard output format will usually be the easiest way to do it.
The output directory is published as with category name “JUnitXMLResultsDir”.
-
outputDir
= None¶ The directory to write the XML files to, as an absolute path, or relative to the testRootDir.
Project
${...}
properties can be used in the path.
-
CSVResultsWriter¶
-
class
pysys.writer.outcomes.
CSVResultsWriter
(logfile, **kwargs)[source]¶ Bases:
pysys.writer.api.BaseRecordResultsWriter
Class to log results to logfile in CSV format.
Writing of the test summary file defaults to the working directory. This can be be over-ridden in the PySys project file using the nested <property> tag on the <writer> tag. The CSV column output is in the form:
id, title, cycle, startTime, duration, outcome