rflogs


Namerflogs JSON
Version 0.17.0 PyPI version JSON
download
home_pageNone
SummaryA CLI tool for uploading Robot Framework test results to rflogs.io
upload_time2024-10-05 21:30:56
maintainerNone
docs_urlNone
authorMikko Korpela
requires_python<4.0,>=3.8
licenseApache-2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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:

```bash
pipx install rflogs
```

or

```bash
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.

## 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`

### Constraints

- **Tag Keys:**

  - **Must start with a letter (a-z, A-Z).**
  - **Length:** 1 to 50 characters.
  - **Allowed Characters:** Letters, numbers, underscores (`_`), hyphens (`-`), dots (`.`).
  - **Case-Insensitive:** `Env` and `env` are considered the same key.

- **Tag Values:**

  - **Length:** 1 to 100 characters.
  - **Allowed Characters:** Letters, numbers, spaces, underscores (`_`), hyphens (`-`), dots (`.`), slashes (`/`).
  - **Case-Sensitive.**

### Examples

```bash
# Valid Tags
rflogs upload -t env:production -t browser:chrome -t regression

# Invalid Tag Key (starts with a number)
rflogs upload -t 1env:production  # Will produce an error

# Invalid Tag Value (contains invalid character '@')
rflogs upload -t env:prod@ction  # Will produce an error
```

### Uploading Test Results

Upload test results after running your Robot Framework tests:

```bash
rflogs upload [OUTPUTDIR]
```

- `OUTPUTDIR`: Optional. Specifies the location of the test output files. Default is the current directory.
- The command does not perform a recursive search.

This command will:
1. Find relevant test result files (log.html, report.html, output.xml, and screenshots) in the specified directory
2. Compress output.xml using tar.gz
3. Upload all files to the RF Logs server
4. Provide a link to view the uploaded results

Example output:

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

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

Overview: https://rflogs.io/runs/1234abcd
Log:      https://rflogs.io/runs/1234abcd/log.html
Report:   https://rflogs.io/runs/1234abcd/report.html
```

### Listing Uploads

View your recent uploads:

```bash
rflogs list
```

Example output:

```
$ rflogs list
Available runs:
  1234abcd
  5678efgh
  90ijklmn

To view details of a specific run, use: rflogs info <run_id>
```

### View Upload Details

Get details about a specific result:

```bash
rflogs info <run_id>
```

Example output:

```
$ rflogs info 1234abcd
Run ID: 1234abcd
Files: 5
  - log.html (ID: 1)
  - report.html (ID: 2)
  - output.xml (ID: 3)
  - screenshot1.png (ID: 4)
  - screenshot2.png (ID: 5)
```

### Downloading Test Results

Download test results to your local machine:

```bash
rflogs download <run_id>
```

This command downloads all files associated with the specified test result to your current directory.

Example output:

```
$ rflogs download 1234abcd
Downloaded log.html
Downloaded report.html
Downloaded output.xml
Downloaded screenshot1.png
Downloaded screenshot2.png
```

### Deleting a Test Run

To delete a specific run:

```bash
rflogs delete <run_id>
```

This command will immediately delete the specified run and its associated files from the server.

## Integration with CI/CD Systems

### GitHub Actions

To integrate `rflogs` with GitHub Actions, add the following step to your workflow:

```yaml
- name: Upload Robot Framework results
  env:
    RFLOGS_API_KEY: ${{ secrets.RFLOGS_API_KEY }}
  run: |
    pipx install rflogs
    rflogs upload ./results
```

Make sure to set the `RFLOGS_API_KEY` secret in your GitHub repository settings.

### Other CI/CD Systems

For other CI/CD systems:

1. Install the RF Logs CLI tool in your CI environment
2. Set the `RFLOGS_API_KEY` environment variable
3. Run `rflogs upload` with the appropriate output directory


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "rflogs",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "Mikko Korpela",
    "author_email": "mikko.korpela@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/f5/8e/e1001698a369c21597cf7bbc0b1cce1c626bcc3cfbdc077bcb83b33c39d2/rflogs-0.17.0.tar.gz",
    "platform": null,
    "description": "# rflogs CLI\n\n`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.\n\n## Installation\n\nInstall `rflogs` using pipx (recommended) or pip:\n\n```bash\npipx install rflogs\n```\n\nor\n\n```bash\npip install rflogs\n```\n\n## Usage\n\n### Authentication\n\n`rflogs` uses an API key for authentication. Set your RF Logs API key as an environment variable:\n\n```bash\nexport RFLOGS_API_KEY=your_api_key_here\n```\n\nYou can add this line to your shell configuration file (e.g., `.bashrc`, `.zshrc`) to make it permanent.\n\n## Tagging Runs\n\nYou 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.\n\n### Tag Format\n\n- **Key-Value Tags:** `key:value`\n- **Simple Tags:** `tag`\n\n### Constraints\n\n- **Tag Keys:**\n\n  - **Must start with a letter (a-z, A-Z).**\n  - **Length:** 1 to 50 characters.\n  - **Allowed Characters:** Letters, numbers, underscores (`_`), hyphens (`-`), dots (`.`).\n  - **Case-Insensitive:** `Env` and `env` are considered the same key.\n\n- **Tag Values:**\n\n  - **Length:** 1 to 100 characters.\n  - **Allowed Characters:** Letters, numbers, spaces, underscores (`_`), hyphens (`-`), dots (`.`), slashes (`/`).\n  - **Case-Sensitive.**\n\n### Examples\n\n```bash\n# Valid Tags\nrflogs upload -t env:production -t browser:chrome -t regression\n\n# Invalid Tag Key (starts with a number)\nrflogs upload -t 1env:production  # Will produce an error\n\n# Invalid Tag Value (contains invalid character '@')\nrflogs upload -t env:prod@ction  # Will produce an error\n```\n\n### Uploading Test Results\n\nUpload test results after running your Robot Framework tests:\n\n```bash\nrflogs upload [OUTPUTDIR]\n```\n\n- `OUTPUTDIR`: Optional. Specifies the location of the test output files. Default is the current directory.\n- The command does not perform a recursive search.\n\nThis command will:\n1. Find relevant test result files (log.html, report.html, output.xml, and screenshots) in the specified directory\n2. Compress output.xml using tar.gz\n3. Upload all files to the RF Logs server\n4. Provide a link to view the uploaded results\n\nExample output:\n\n```\n$ rflogs upload ./results\nUploading results\n  output.xml    1.20 MB - compressed to 800.00 KB \u2713\n  log.html    256.00 KB \u2713\n  report.html 128.00 KB \u2713\n  screenshot1.png 45.00 KB \u2713\n  screenshot2.png 52.00 KB \u2713\n\nRun ID: 1234abcd\nFiles:  5\nSize:   1.28 MB\n\nOverview: https://rflogs.io/runs/1234abcd\nLog:      https://rflogs.io/runs/1234abcd/log.html\nReport:   https://rflogs.io/runs/1234abcd/report.html\n```\n\n### Listing Uploads\n\nView your recent uploads:\n\n```bash\nrflogs list\n```\n\nExample output:\n\n```\n$ rflogs list\nAvailable runs:\n  1234abcd\n  5678efgh\n  90ijklmn\n\nTo view details of a specific run, use: rflogs info <run_id>\n```\n\n### View Upload Details\n\nGet details about a specific result:\n\n```bash\nrflogs info <run_id>\n```\n\nExample output:\n\n```\n$ rflogs info 1234abcd\nRun ID: 1234abcd\nFiles: 5\n  - log.html (ID: 1)\n  - report.html (ID: 2)\n  - output.xml (ID: 3)\n  - screenshot1.png (ID: 4)\n  - screenshot2.png (ID: 5)\n```\n\n### Downloading Test Results\n\nDownload test results to your local machine:\n\n```bash\nrflogs download <run_id>\n```\n\nThis command downloads all files associated with the specified test result to your current directory.\n\nExample output:\n\n```\n$ rflogs download 1234abcd\nDownloaded log.html\nDownloaded report.html\nDownloaded output.xml\nDownloaded screenshot1.png\nDownloaded screenshot2.png\n```\n\n### Deleting a Test Run\n\nTo delete a specific run:\n\n```bash\nrflogs delete <run_id>\n```\n\nThis command will immediately delete the specified run and its associated files from the server.\n\n## Integration with CI/CD Systems\n\n### GitHub Actions\n\nTo integrate `rflogs` with GitHub Actions, add the following step to your workflow:\n\n```yaml\n- name: Upload Robot Framework results\n  env:\n    RFLOGS_API_KEY: ${{ secrets.RFLOGS_API_KEY }}\n  run: |\n    pipx install rflogs\n    rflogs upload ./results\n```\n\nMake sure to set the `RFLOGS_API_KEY` secret in your GitHub repository settings.\n\n### Other CI/CD Systems\n\nFor other CI/CD systems:\n\n1. Install the RF Logs CLI tool in your CI environment\n2. Set the `RFLOGS_API_KEY` environment variable\n3. Run `rflogs upload` with the appropriate output directory\n\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "A CLI tool for uploading Robot Framework test results to rflogs.io",
    "version": "0.17.0",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "745f9d4357b855020fe89a0a928e14380af91cd8dff279bd55d30a4ec5a56732",
                "md5": "e4f2fc45db5a20cc47f5b2d21b0d7911",
                "sha256": "9f9156d7f298cf93b5a1eaa4bb5a642dea0d14cfa19af4142cea2e995fd91ab0"
            },
            "downloads": -1,
            "filename": "rflogs-0.17.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e4f2fc45db5a20cc47f5b2d21b0d7911",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8",
            "size": 11396,
            "upload_time": "2024-10-05T21:30:55",
            "upload_time_iso_8601": "2024-10-05T21:30:55.178337Z",
            "url": "https://files.pythonhosted.org/packages/74/5f/9d4357b855020fe89a0a928e14380af91cd8dff279bd55d30a4ec5a56732/rflogs-0.17.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f58ee1001698a369c21597cf7bbc0b1cce1c626bcc3cfbdc077bcb83b33c39d2",
                "md5": "1570c4b398391a4325b65e4ed17ed09b",
                "sha256": "fb2678c6d2051b44f5a49445c04a04542e680a1c9919f3112f3ce2b02f6416e8"
            },
            "downloads": -1,
            "filename": "rflogs-0.17.0.tar.gz",
            "has_sig": false,
            "md5_digest": "1570c4b398391a4325b65e4ed17ed09b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8",
            "size": 10482,
            "upload_time": "2024-10-05T21:30:56",
            "upload_time_iso_8601": "2024-10-05T21:30:56.288248Z",
            "url": "https://files.pythonhosted.org/packages/f5/8e/e1001698a369c21597cf7bbc0b1cce1c626bcc3cfbdc077bcb83b33c39d2/rflogs-0.17.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-05 21:30:56",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "rflogs"
}
        
Elapsed time: 0.61009s