Skip to main content

A CLI tool for uploading Robot Framework test results to rflogs.io

Project description

rflogs CLI

rflogs is a command-line interface tool for uploading and managing Robot Framework test results with the RF Logs service. It provides an easy way to integrate RF Logs with your CI/CD pipelines or local development workflow.

Installation

Install rflogs using pipx (recommended) or pip:

pipx install rflogs

or

pip install rflogs

## Usage

### Authentication

`rflogs` uses an API key for authentication. Set your RF Logs API key as an environment variable:

```bash
export RFLOGS_API_KEY=your_api_key_here

You can add this line to your shell configuration file (e.g., .bashrc, .zshrc) to make it permanent. Without a valid API key, rflogs commands will not work. Ensure you have set this environment variable before proceeding with any operations.

After setting up your API key and installing rflogs, you can start using the tool. Here are the main commands:

  • rflogs upload: Upload test results
  • rflogs list: List available runs
  • rflogs info: Get information about a specific run
  • rflogs download: Download test results
  • rflogs delete: Delete a specific run

Uploading Test Results

Upload test results after running your Robot Framework tests:

rflogs upload [OPTIONS] [OUTPUTDIR]
  • OUTPUTDIR: Optional. Specifies the location of the test output files. Default is the current directory.
  • The command does not perform a recursive search.

Options:

  • -o, --output: Specify the XML output file. Default: output.xml
  • -l, --log: Specify the HTML log file. Default: log.html
  • -r, --report: Specify the HTML report file. Default: report.html
  • Use NONE as the value to skip uploading a specific file type.

This command will:

  1. Find relevant test result files in the specified directory
  2. Compress output.xml using gzip if it's larger than 1MB
  3. Upload all files to the RF Logs server
  4. Provide a link to view the uploaded results

Example usage:

rflogs upload ./results --output custom_output.xml --log custom_log.html --report NONE

Example output:

$ rflogs upload ./results
Uploading results
  output.xml    1.20 MB - compressed to 800.00 KB [OK]
  log.html    256.00 KB [OK]
  report.html 128.00 KB [OK]
  screenshot1.png 45.00 KB [OK]
  screenshot2.png 52.00 KB [OK]

Run ID: 1234abcd
Files:  5
Size:   1.28 MB

HTML Files:
  Log:      https://rflogs.io/files/log.html
  Report:   https://rflogs.io/files/report.html
  Run:      https://rflogs.io/run-details.html?runId=1234abcd

Tagging Runs

You can associate tags with your test runs to categorize and filter them. Tags can be specified using the --tag or -t option when uploading results.

Tag Format

  • Key-Value Tags: key:value
  • Simple Tags: tag

Examples

rflogs upload -t env:production -t browser:chrome -t regression

Tags help in organizing and filtering your test runs on the RF Logs platform.

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

rflogs-0.20.0.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

rflogs-0.20.0-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file rflogs-0.20.0.tar.gz.

File metadata

  • Download URL: rflogs-0.20.0.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for rflogs-0.20.0.tar.gz
Algorithm Hash digest
SHA256 b3405d30fc5b8147b0a86639d1e3e3d357b664f09bf2a0bf41071b266376859e
MD5 e5f2bad933e84f2191f358ea69713ddf
BLAKE2b-256 45eabeef60fefbb9b3c5144cd2d872932b4f5d9795ed8046bf1108a9f7e42a2d

See more details on using hashes here.

File details

Details for the file rflogs-0.20.0-py3-none-any.whl.

File metadata

  • Download URL: rflogs-0.20.0-py3-none-any.whl
  • Upload date:
  • Size: 11.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for rflogs-0.20.0-py3-none-any.whl
Algorithm Hash digest
SHA256 da5211c5fad6b593fc7f982c08b3c7e64172e5b86633766293ec570fbd9ebf0a
MD5 f068da64544268f5b1acb5d61b1e7301
BLAKE2b-256 60644651d3f39e9d13e11d59be213bc7424f6dbb16b74b7a3e10a3d904f30aee

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