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.htmlget really big on disk.- The
output.xmlneeds "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.xmlalready 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 NONEarguments 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:
Metadata
Release files for robotframework-output-stream 0.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| robotframework-output-stream-0.0.6.tar.gz | 36.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| robotframework_output_stream-0.0.6-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 73.5 kB
Release files / robotframework-output-stream-0.0.6.tar.gz
| Download URL | robotframework-output-stream-0.0.6.tar.gz |
|---|---|
| Size | 36.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
871cc92cb1b4b98a4d2b127c8b8e3682b6a4c52ca102457bebdf156a3e672bfb
|
|
BLAKE2b-256 checksum How to use checksums |
778193a185bbdfcfbd268f342a2c0452a42e5a8947d7900baaadf6c9e8963600
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.15
|
Release files / robotframework_output_stream-0.0.6-py2.py3-none-any.whl
| Download URL | robotframework_output_stream-0.0.6-py2.py3-none-any.whl |
|---|---|
| Size | 37.0 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
55d6e01f7e3027fb2da12864bf4b93c7f44e881cb0ccc0fd54958cec76734500
|
|
BLAKE2b-256 checksum How to use checksums |
5eef363cc1a51bb9cd05bf5edeb857e0fb481b7e1fcadb32c0364d8ed9531ce0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.15
|