Skip to content

Latest commit

 

History

History
90 lines (55 loc) · 4.19 KB

File metadata and controls

90 lines (55 loc) · 4.19 KB

rf-python-varfiles

This repository provides a working example to learn and test Robot Framework automation - the test scripting language used by Robotmk for Synthetic Monitoring in Checkmk.

How to Run the example

Run online in a VS Code Devcontainer (recommended)

This is the easiest way to run the example — no local installation needed. Just click the button below:

Run this Robot in GitHub Codespaces

How to run the example in Codespace

What is a GitHub Codespace?
A Codespace is a browser-based development environment (VS Code) hosted by GitHub — no local installation needed.

Manually with RCC

To run the example manually, refer to the blog post with the step-by-step instructions:
How to Run Robot Framework Examples with RCC
Troubleshooting RCC

About this Robot Framework test

Minimal example for loading variables and configuration into a Robot Framework suite from Python and YAML files. Demonstrates the three variable file patterns supported by RF: plain scalars, nested dicts, and the get_variables() function — plus YAML as a data-format alternative to Python.

  • Exposing computed scalar values (e.g. current user, timestamp) from a Python variable file
  • Accessing values from a nested dict loaded via a Python variable file using the [key] subscript syntax
  • Loading a nested data structure from a YAML variable file (same access syntax as Python dicts)
  • Using a get_variables(arg) function to return different variable sets depending on an argument passed at import time
  • Selecting an environment config block at runtime by combining a suite variable with a nested dict key

Test Cases

Test Case Description
Test Pyvars-Simple How to expose simple scalar values from a Python file as suite variables
Test Pyvars-Nested How to access individual values from a nested dict loaded via a Python variable file
Test YML-Nested How to load a nested data structure from a YAML variable file
Test Get-Variables With Argument How to use get_variables() to return different variable sets based on an argument passed at import time

Links

Recommended links for this example

General links & Documentation

Libraries and Versions used in this example

Library Version
Python 3.12
Robot Framework 7.4

About

Also try the other RF example suites, they all work in the Codespace environment.

🪲 Found a bug or have a suggestion?
Open an issue or submit a pull request — contributions are welcome.

📖 Want to go deeper? Want ot get a certified professional?
→ I offer Synthetic Monitoring Trainings or book a free call.

Simon Meggle — Founder of Robotmk, Product Manager Synthetic Monitoring at Checkmk


This repository is automatically synced from elabit/robotmk-starter. Do not edit files here directly — changes will be overwritten on the next sync. Last sync: b9e1a9b