Skip to main content

RobotmkBridge integrates the results of arbitrary testing tools into Checkmk.

Project description

Robotmk Bridge

The bridge between automation islands and your monitoring

Robotmk Bridge is a Robot Framework library, listener, and CLI that for external test tools to convert their results into Robot Framework results.

It is used in two modes:

  • As Python Package, e.g. in the Robotmk Bridge Agent Plugin
  • As a Robot Framework Library to run external test tools from Robot Framework tests.

In both cases, the goal is to integrate any test results into Checkmk monitoring with the help of Robotmk.

Features

  • Unifies third-party test results into the Robot Framework XML format
  • Conversion is done by Handlers,
  • Robot Framework 6.x and 7.x supported
  • Working modes
    • Use as a library rmkbridge.RobotmkBridgeLibrary plus the listener rmkbridge.listener
    • Convert existing results via CLI (python -m rmkbridge)

Installation

pip install robotframework-robotmk-bridge

Prerequisites

To verify the installation:

python -m rmkbridge --version

Quickstart

Option 1: Use as a Library to execute Test tools from Robot Framework

This mode consists of two steps:

  1. Running the tool in Robot Framework via Run keyword
  2. Running the Bridge-Listener

1.1: Running the tool directly in Robot Framework

Each supported external test tool comes with a special trigger keyword Run <tool> to run the tool from inside Robot Framework. Depending on the Handler, the keywords support individual arguments.

*** Settings ***
Library    rmkbridge.RobotmkBridgeLibrary

*** Test Cases ***

# runs a JUnit test
JUnit unit tests should pass
    Custom Keyword 1
    Run JUnit    path/to/results.xml    java -jar junit.jar --reports-dir path/to
    Custom Keyword 2

# runs a Gatling test
Gatling regression should stay green
    Custom Keyword 1
    Run Gatling    path/to/gatling.log    ${GATLING_HOME}/bin/gatling.sh --simulation MySimulation
    Custom Keyword 2

# Runs a ZAP test

ZAP scan finds no blockers
    Custom Keyword 1
    Run Zap    path/to/zap.json    python zap_scan.py
    Custom Keyword 2

1.2: Running the Listener

After the suite execution, run the suite with the Robotmk Bridge listener so the external reports are injected into the output:

robot --listener rmkbridge.listener tests/my_suite.robot

The listener then creates test results using the following rules:

  • Keywords before the trigger keyword are wrapped into a Test Setup keyword.
  • trigger keywords (which run the tools) become Test Cases.
  • Keywords after the trigger keyword are wrapped into a Test Teardown keyword.

Note: you should use only 1 trigger keyword per test case.

Option 2: Command Line Usage to convert existing results

💡 This is the mode used by the Robotmk Bridge Plugin for Checkmk.

Use the CLI when you need to convert tool reports without running Robot Framework suites:

python -m rmkbridge rmkbridge.junit --result-file path/to/results.xml
  • The converted file gets created next to the source as *_robot_output.xml.
  • Similar to trigger keywords, each handler also exposes its own CLI flags. List them with python -m rmkbridge rmkbridge.junit --help.
  • Global switches:
    • python -m rmkbridge --print-config
    • python -m rmkbridge --add-config path/to/custom_handler.yml
    • python -m rmkbridge --reset-config

Keyword Documentation

  • Open the generated keyword reference

  • Regenerate locally when you add handlers:

    python -m robot.libdoc rmkbridge.RobotmkBridgeLibrary docs/RobotmkBridgeLibrary-$(python -c "import rmkbridge; print(rmkbridge.VERSION)").html
    

🤝 Contribute Your Own Handlers!

Robotmk Bridge is an open-source project — and we’d love to see it grow with the help of the community!

With a growing number of handlers, our goal is to make Robotmk a truly multi-purpose integration layer for all kinds of test results.

If you’re working with a testing tool that isn’t supported yet, consider developing your own Bridge Handler and sharing it with others.

Every new handler expands what Robotmk can do and helps bring monitoring and test automation even closer together.

Pull requests, discussions, and ideas are always welcome!

Read more:

License & Acknowledgements

RobotmkBridge stands on the shoulders of giants: the project robotframework-oxygen, written by Eficode Oy, Finland 🇫🇮.

See ACKNOWLEDGEMENTS.md for the roots of the project and credits.

Released under the MIT License.

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_robotmk_bridge-0.4.1.tar.gz (24.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

robotframework_robotmk_bridge-0.4.1-py3-none-any.whl (31.1 kB view details)

Uploaded Python 3

File details

Details for the file robotframework_robotmk_bridge-0.4.1.tar.gz.

File metadata

File hashes

Hashes for robotframework_robotmk_bridge-0.4.1.tar.gz
Algorithm Hash digest
SHA256 1f476e50a27e50b15f9afde91ecf48e7fdb4064878ac78a0ee864920c22f65d4
MD5 5bc480cca8be7df03fb2ae1f51ddd1bb
BLAKE2b-256 1f50a4c637a798f54dd7635e50d3e669db67432f9bfd7b3158866625ae135b82

See more details on using hashes here.

Provenance

The following attestation bundles were made for robotframework_robotmk_bridge-0.4.1.tar.gz:

Publisher: release.yml on elabit/robotmk-bridge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file robotframework_robotmk_bridge-0.4.1-py3-none-any.whl.

File metadata

File hashes

Hashes for robotframework_robotmk_bridge-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c26f0527b0fdd6bc72dac81ed2a918fe6402720d8ab99dcaa8910e8f84bc892b
MD5 90bacb7ed4e5376bc9be80b119e618b5
BLAKE2b-256 d8a638f3e6147d65ae6fe766e742c831ced75f2d324a81cdeb3491a3842f60a3

See more details on using hashes here.

Provenance

The following attestation bundles were made for robotframework_robotmk_bridge-0.4.1-py3-none-any.whl:

Publisher: release.yml on elabit/robotmk-bridge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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