Classes | |
| class | Rebot |
Functions | |
| def | rebot (*outputs, **options) |
| Programmatic entry point for post-processing outputs. More... | |
| def | rebot_cli (arguments=None, exit=True) |
| Command line execution entry point for post-processing outputs. More... | |
Variables | |
| string | USAGE |
| def robot.rebot.rebot | ( | * | outputs, |
| ** | options | ||
| ) |
Programmatic entry point for post-processing outputs.
:param outputs: Paths to Robot Framework output files similarly
as when running the ``rebot`` command on the command line.
:param options: Options to configure processing outputs. Accepted
options are mostly same as normal command line options to the ``rebot``
command. Option names match command line option long names without
hyphens so that, for example, ``--name`` becomes ``name``.
The semantics related to passing options are exactly the same as with the
:func:`~robot.run.run` function. See its documentation for more details.
Examples::
from robot import rebot
rebot('path/to/output.xml')
with open('stdout.txt', 'w') as stdout:
rebot('o1.xml', 'o2.xml', name='Example', log=None, stdout=stdout)
Equivalent command line usage::
rebot path/to/output.xml
rebot --name Example --log NONE o1.xml o2.xml > stdout.txt
| def robot.rebot.rebot_cli | ( | arguments = None, |
|
exit = True |
|||
| ) |
Command line execution entry point for post-processing outputs.
:param arguments: Command line options and arguments as a list of strings.
Defaults to ``sys.argv[1:]`` if not given.
:param exit: If ``True``, call ``sys.exit`` with the return code denoting
execution status, otherwise just return the rc.
Entry point used when post-processing outputs from the command line, but
can also be used by custom scripts. Especially useful if the script itself
needs to accept same arguments as accepted by Rebot, because the script can
just pass them forward directly along with the possible default values it
sets itself.
Example::
from robot import rebot_cli
rebot_cli(['--name', 'Example', '--log', 'NONE', 'o1.xml', 'o2.xml'])
See also the :func:`rebot` function that allows setting options as keyword
arguments like ``name="Example"`` and generally has a richer API for
programmatic Rebot execution.