Skip to main content

Robot Framework Output Stream (a RF listener to provide an output that's compact and streamable).

Project description

Compact and streaming-ready output for Robot Framework.

A custom output listener for Robot Framework enabling real-time analysis in a more compact format.

Note: The current version is still pre-alpha and the format specified may still change.

Why

The default Robot Framework output and reports quickly get really big or break when running big or long-running cases. Log handling is also using a lot of resources and if robot execution just breaks, the output.xml usually is corrupted and needs manual fixes.

Scoping the problem

The default output of Robot Framework (output.xml, log.html and report.html):

  • Unable to stream the log by default during the run
  • The output generation is a resource-heavy task that can and does break executions.
  • output.xml, log.html, report.html get really big on disk.
  • The output.xml needs "closing", so any problems while creating it yield a corrupted XML file and no logs.
    • Post-processing is only possible in some cases and is also resource intensive.
    • ..and in cases where the output.xml already breaks the post-processing is not possible.
  • Flattening and changing the robot code is a big task and is only sometimes possible.

Scoping the solution

We need:

  • Compact format to reduce the file size and reduce the load on machine resources.
  • The output file that is intact after each write (journaling/transactional pattern).
  • Ability to control how much space the logs can take.
  • Ability to stream the log during the run
  • Match the original data content, so it is possible to create the existing logs from the new data format.
  • Solution needs to work without changes to the robot code itself.

What

Implementation is based on a Robot Framework Listener, so it's possible to use it in any Robot Framework run using the --listener argument.

Installation

Install with:

pip install robotframework-output-stream

Usage

python -m robot -l NONE -r NONE -o NONE --listener robot_out_stream.RFStream:--dir=<dir_to_output>:--max-file-size=<5m>:--max-files=<5>:--log=<log.html>

  • The -l NONE and -r NONE -o NONE arguments disable the standard Robot Framework output.
  • More details on the arguments are below.

Dealing with sensitive data in the logs

How

The "how" of the solution is essentially the listener arguments, data format and the parsers:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

robotframework-output-stream-0.0.5.tar.gz (36.2 kB view details)

Uploaded Source

Built Distribution

robotframework_output_stream-0.0.5-py2.py3-none-any.whl (36.6 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file robotframework-output-stream-0.0.5.tar.gz.

File metadata

File hashes

Hashes for robotframework-output-stream-0.0.5.tar.gz
Algorithm Hash digest
SHA256 509c74689cc881039248603e70fce2ba8c1913b9fce7635f019290ed9606ec1b
MD5 8476e7d2a6342b3b4ef1027d239deb20
BLAKE2b-256 2b7c7075c855d46b85c1358c3de847ceb2a3a3606b7f0a6fcb7f621a1a9f2124

See more details on using hashes here.

File details

Details for the file robotframework_output_stream-0.0.5-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for robotframework_output_stream-0.0.5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 3a72142dc54194c4071ca087a2cf61c0df1131c35c312d6bf4a26b86f91ea6a8
MD5 c2c8060535257d0e67ead850ac983d1e
BLAKE2b-256 2dd23ebf13b515ab846b5faa6f6b12209296ca93fba2335005cb2357fb13c229

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page