Robot Framework
robot.reporting.resultwriter.ResultWriter Class Reference

A class to create log, report, output XML and xUnit files. More...

Public Member Functions

def __init__ (self, *sources)
 
def write_results (self, settings=None, **options)
 Writes results based on the given settings or options. More...
 

Private Member Functions

def _write (self, name, writer, path, *args)
 
def _write_log (self, js_result, path, config)
 
def _write_output (self, result, path)
 
def _write_report (self, js_result, path, config)
 
def _write_xunit (self, result, path)
 

Private Attributes

 _sources
 

Detailed Description

A class to create log, report, output XML and xUnit files.

:param sources: Either one :class:`~robot.result.executionresult.Result`
    object, or one or more paths to existing output XML files.

By default writes ``report.html`` and ``log.html``, but no output XML
or xUnit files. Custom file names can be given and results disabled
or enabled using ``settings`` or ``options`` passed to the
:meth:`write_results` method. The latter is typically more convenient::

    writer = ResultWriter(result)
    writer.write_results(report='custom.html', log=None, xunit='xunit.xml')

Definition at line 40 of file resultwriter.py.

Constructor & Destructor Documentation

◆ __init__()

def robot.reporting.resultwriter.ResultWriter.__init__ (   self,
sources 
)

Definition at line 42 of file resultwriter.py.

Member Function Documentation

◆ _write()

def robot.reporting.resultwriter.ResultWriter._write (   self,
  name,
  writer,
  path,
args 
)
private

Definition at line 82 of file resultwriter.py.

◆ _write_log()

def robot.reporting.resultwriter.ResultWriter._write_log (   self,
  js_result,
  path,
  config 
)
private

Definition at line 76 of file resultwriter.py.

◆ _write_output()

def robot.reporting.resultwriter.ResultWriter._write_output (   self,
  result,
  path 
)
private

Definition at line 70 of file resultwriter.py.

◆ _write_report()

def robot.reporting.resultwriter.ResultWriter._write_report (   self,
  js_result,
  path,
  config 
)
private

Definition at line 79 of file resultwriter.py.

◆ _write_xunit()

def robot.reporting.resultwriter.ResultWriter._write_xunit (   self,
  result,
  path 
)
private

Definition at line 73 of file resultwriter.py.

◆ write_results()

def robot.reporting.resultwriter.ResultWriter.write_results (   self,
  settings = None,
**  options 
)

Writes results based on the given settings or options.

    :param settings: :class:`~robot.conf.settings.RebotSettings` object
        to configure result writing.
    :param options: Used to construct new
        :class:`~robot.conf.settings.RebotSettings` object if ``settings``
        are not given.

Definition at line 53 of file resultwriter.py.

Member Data Documentation

◆ _sources

robot.reporting.resultwriter.ResultWriter._sources
private

Definition at line 43 of file resultwriter.py.


The documentation for this class was generated from the following file: