Skip to content

Commit 6b76d91

Browse files
committed
feat: reorganized content, better readme
1 parent cc671f8 commit 6b76d91

42 files changed

Lines changed: 501 additions & 588 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/scripts/sync-examples.sh

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,22 @@ build_header() {
5555
local repo_id="$2"
5656
local has_devcontainer="$3"
5757
local badge
58-
badge="$(build_codespaces_badge "${repo_id}" "${has_devcontainer}")"
58+
# no button at the beginning
59+
#badge="$(build_codespaces_badge "${repo_id}" "${has_devcontainer}")"
5960
[[ -n "${badge}" ]] && printf '%s\n\n' "${badge}"
61+
62+
# <picture>
63+
# <source media="(prefers-color-scheme: dark)" srcset="https://www.robotmk.org/rmk_crop_transp_w150.png">
64+
# <source media="(prefers-color-scheme: light)" srcset="https://www.robotmk.org/rmk_crop_transp_150.png">
65+
# </picture>
66+
}
67+
68+
build_footer() {
69+
70+
6071
cat <<EOF
72+
> ---
73+
>
6174
> **This repository is automatically synced from [${SOURCE_REPO}](https://github.com/${SOURCE_REPO}/tree/main/examples/${name}).**
6275
> Do not edit files here directly — changes will be overwritten on the next sync.
6376
> Last sync: [\`${SOURCE_SHA:0:7}\`](https://github.com/${SOURCE_REPO}/commit/${SOURCE_SHA})
@@ -66,20 +79,6 @@ build_header() {
6679
6780
EOF
6881

69-
# <picture>
70-
# <source media="(prefers-color-scheme: dark)" srcset="https://www.robotmk.org/rmk_crop_transp_w150.png">
71-
# <source media="(prefers-color-scheme: light)" srcset="https://www.robotmk.org/rmk_crop_transp_150.png">
72-
# </picture>
73-
}
74-
75-
build_footer() {
76-
local repo_id="$1"
77-
local has_devcontainer="$2"
78-
local badge
79-
badge="$(build_codespaces_badge "${repo_id}" "${has_devcontainer}")"
80-
if [[ -n "${badge}" ]]; then
81-
printf '\n%s\n' "${badge}"
82-
fi
8382
}
8483

8584
prepend_header() {

.github/scripts/update_suite_table.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,25 +92,21 @@ def get_space(suite_dir: Path) -> str:
9292

9393
def build_table(repo_root: Path, parent: str) -> str:
9494
is_examples = parent == "examples"
95-
header = "| Suite | Description | Dependencies |" + (" Repo |" if is_examples else "")
96-
sep = "|---|---|---|" + ("---|" if is_examples else "")
95+
header = "| Robot Framework Suite | Description |" + (" Repository Link |" if is_examples else "")
96+
sep = "|---|---|" + ("---|" if is_examples else "")
9797
rows = []
9898
parent_dir = repo_root / parent
9999
if parent_dir.exists():
100100
for suite_dir in sorted(parent_dir.iterdir()):
101101
if not suite_dir.is_dir() or suite_dir.name.startswith("."):
102102
continue
103103
name = suite_dir.name
104-
v = parse_conda_versions(suite_dir / "conda.yaml")
105104
doc = parse_suite_doc(suite_dir)
106105
rel = f"{parent}/{name}"
107-
deps = "<br>".join(
108-
f"• {pkg}=={version}" for pkg, version in sorted(v.items())
109-
)
110106
repo_col = ""
111107
if is_examples:
112108
repo_col = f" [try out](https://github.com/robotmk/example-{name}) |"
113-
rows.append(f"| [{name}]({rel}) | {doc} | {deps} |{repo_col}")
109+
rows.append(f"| [{name}]({rel}) | {doc} |{repo_col}")
114110
return "\n".join([header, sep] + rows)
115111

116112

README.md

Lines changed: 29 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -4,36 +4,38 @@
44
<img alt="Robotmk" src="https://www.robotmk.org/rmk_crop_transp_150.png">
55
</picture>
66

7-
# robotmk-starter
8-
97
<!-- CI-BADGE-START -->
108
[![Run Suites](https://github.com/elabit/robotmk-starter/actions/workflows/run-suites.yml/badge.svg)](https://github.com/elabit/robotmk-starter/actions/workflows/run-suites.yml)
119
<!-- CI-BADGE-END -->
10+
# robotmk-starter
11+
12+
1213

13-
![alt text](docs/img/cmk_rmk_small.png)
14+
## What is this?
1415

15-
> **Ready-to-run Robot Framework suites for [Checkmk](https://checkmk.com) synthetic monitoring with [Robotmk](https://www.robotmk.org), the [Robot Framework](https://robotframework.org/) integration for Checkmk.**
16+
This repository provides **working examples** to learn and test [Robot Framework](https://robotframework.org/) automation - the test scripting language used by [Robotmk](https://www.robotmk.org) for *Synthetic Monitoring* in [Checkmk](https://checkmk.com).
1617

17-
This repo gives you a running starting point.
18+
## Choose your path:
1819

19-
## Overview
20+
You want to...
2021

21-
Two kinds of content live here:
22+
- ... play around with working **Robot Framework** examples?
23+
→ Read the [example guide](docs/example_guide.md) - *Copy/Paste the examples or try them online.*
24+
- ... need a skeleton to start your own **Robot Framework** suite?
25+
→ Check out the [templates](templates/) folder - *Copy one, fill in your test steps, run it.*
26+
- ... 🚀 want to **start a Checkmk playground** to live test **Robotmk** for Synthetic Monitoring*?
27+
→ Read the [Checkmk codespace documentation](docs/CMK-Codespace.md).
2228

23-
| | [`examples/`](examples/) | [`templates/`](templates/) |
24-
|------------------|----------------------------------|-----------------------------------------|
25-
| **What** | Full working RF suites | Minimal skeletons |
26-
| **Purpose** | Learn by example, adapt and copy | Blank canvas for your own suite |
2729

28-
The tables below are auto-generated from each suite's content and refreshed on every CI run.
2930

3031

31-
## /examples
32+
## Content
3233

33-
All examples are automatically deployed to individual GitHub repositories.
34-
Click on "*try out*" to open the example repo, where you find instructions to run it locally, in VS Code, or online in the Github Codespace.
34+
### Folder "/examples"
3535

36+
A great starting point to **learn** from working Robot Framework test suites.
3637

38+
To try them out, just click on "*try out*" which opens the repository, where you find instructions.
3739

3840
<!-- EXAMPLES-TABLE-START -->
3941

@@ -45,25 +47,13 @@ Click on "*try out*" to open the example repo, where you find instructions to ru
4547

4648
<!-- EXAMPLES-TABLE-END -->
4749

48-
### Your Checkmk Playground: Codespace
49-
50-
As a **bonus**, this repo also contains a Checkmk `.devcontainer/` that spins up a full **CheckMK Pro** instance with a **Fluxbox/noVNC desktop**.
51-
52-
![alt text](docs/img/cmk_disc_small.png)
53-
54-
This is useful to play around with **Checkmk**, **Robotmk** and all the examples together in a pre-configured environment **without installing anything locally**.
55-
56-
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new?hide_repo_select=true&ref=main&repo=1229554077)
57-
58-
Also read the [Full Guide: How to use Checkmk in Codespace](docs/CMK-Codespace.md)
59-
60-
6150
---
6251

63-
## /templates
52+
### Folder "/templates"
53+
54+
These templates provide useful **skeletons** when you want to start your own Robot Framework suite.
6455

65-
Templates are minimal — they contain the structure/concept but not the logic.
66-
Copy one, fill in your test steps, run it.
56+
Each template focuses on a specific use case or integration, providing a ready-to-use structure and example test cases.
6757

6858
<!-- TEMPLATES-TABLE-START -->
6959

@@ -78,30 +68,17 @@ Copy one, fill in your test steps, run it.
7868
## For maintainers
7969

8070
Examples and templates are generated from Copier sources in `_dev/`.
81-
Version pins live in a single file — one edit, one `task generate`, done.
82-
83-
[_dev/README.md](_dev/README.md)
84-
85-
86-
## Closing Notes
87-
88-
This is only the beginning of the journey, there is a lot more to explore in the world of **Robot Framework, Robotmk and Checkmk**.
71+
Version pins live in a single file with packages and versions — edit, `task generate`, done.
8972

90-
In case you have found a bug or have suggestions for improvements, please feel free to open an issue or even better, a pull request.
73+
[Dev documentation](_dev/README.md)
9174

92-
If you want to learn more, there are several ways of how we can support you:
9375

94-
- [Synthetic Monitoring Trainings](https://lp.robotmk.org/robotmk-masterclass-4d-en)
95-
- Implementing a **Robotmk POC** in your company
96-
- Know How Transfer
97-
- Code Review of existing Tests & Coaching Sessions
98-
- "Extended Workbench" - We work together on your test automation projects for a defined period of time
76+
## About
9977

100-
Reach out to us via mail at robotmk.org or book a free [clarification call](https://meet.brevo.com/simon-meggle).
78+
Found a bug or have a suggestion?
79+
[Open an issue](https://github.com/robotmk/robotmk-starter/issues) or submit a [pull request](https://github.com/robotmk/robotmk-starter/pulls) — contributions are welcome.
10180

102-
![alt text](docs/img/portrait_simon_meggle_rund_feiner_rahmen_KLEIN.png)
81+
Want to go deeper? Want ot get a certified professional?
82+
→ I offer [Synthetic Monitoring Trainings](https://lp.robotmk.org/robotmk-masterclass-4d-en) or book a free [call](https://meet.brevo.com/simon-meggle).
10383

104-
**Simon Meggle**
105-
*CEO Elabit GmbH*
106-
*Founder of Robotmk*
107-
*Product Manager of Synthetic Monitoring at Checkmk*
84+
**Simon Meggle** — Founder of Robotmk, Product Manager Synthetic Monitoring at Checkmk
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
# cryptolibrary-simple
22

3-
Minimal example for using [robotframework-crypto](https://github.com/Snooz82/robotframework-crypto) with Robotmk.
4-
Demonstrates how to store an encrypted secret in a Robot Framework suite and decrypt it at runtime using a private key file — no plaintext passwords anywhere in the codebase.
3+
{% include 'how-to-run.partial.md' %}
4+
5+
## About this Robot Framework test
6+
7+
Minimal example for using [robotframework-crypto](https://github.com/Snooz82/robotframework-crypto) with Robotmk.
8+
Demonstrates how to store an encrypted secret in a Robot Framework suite and decrypt it at runtime using a private key file — no plaintext passwords anywhere in the codebase!
59

6-
## What This Demonstrates
710

811
- Encrypting a password with `CryptoLibrary` and storing the `crypt:…` value in the suite
912
- Passing the key password via an environment variable (`RMKCRYPTPW`)
@@ -15,18 +18,15 @@ Demonstrates how to store an encrypted secret in a Robot Framework suite and dec
1518
|---|---|
1619
| `Test Password Equality` | Decrypts an encrypted password string and asserts it equals the known plaintext |
1720

18-
## Key Files
19-
20-
| File | Purpose |
21-
|---|---|
22-
| `suite.robot` | Single test suite with the `Test Password Equality` test case |
23-
| `conda.yaml` | Python environment (Python `{{ python_version }}`, robotframework-crypto `{{ rf_lib_crypto_version }}`) |
24-
| `robot.toml` | Sets the `RMKCRYPTPW` environment variable consumed by CryptoLibrary |
25-
| `keys/private_key.json` | Demo private key for decryption — replace with your own in production |
26-
| `.devcontainer/devcontainer.json` | VS Code devcontainer with RCC pre-installed |
2721

2822
## Links
2923

24+
### Recommended links for this example
25+
26+
- [Robotmk Blog: How to use the CryptoLibrary](https://www.robotmk.org/en/blog/cryptolibrary/)
27+
28+
### General links & Documentation
29+
3030
- [robotframework-crypto](https://github.com/Snooz82/robotframework-crypto)
3131
- [Robot Framework](https://robotframework.org)
3232
- [Robotmk Homepage](https://robotmk.org)

_dev/_examples/cryptolibrary-simple/template/suite.robot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
*** Settings ***
2-
Documentation TODO
2+
Documentation A minimalistic example of how to use the **CryptoLibrary**, without bells and whistles.
33
44
Library CryptoLibrary
55
... key_path=${CURDIR}/keys
@@ -12,6 +12,6 @@ ${PASSWORD_CRYPT} crypt:CorBEZOtizedq5WviZc7nTGiIPle6Bwd5r222Er0sUIS/7jTrkTkxm
1212

1313
*** Test Cases ***
1414
Test Password Equality
15-
[Documentation] TODO
15+
[Documentation] Tests whether the decrypted text matches the expected value.
1616
${pass} Get Decrypted Text ${PASSWORD_CRYPT}
1717
Should Be Equal As Strings ${pass} password123456
Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
# rf-custom-library
22

3+
{% include 'how-to-run.partial.md' %}
4+
5+
## About this Robot Framework test
6+
37
Minimal example for extending Robot Framework with a custom Python library.
48
Demonstrates how to write a simple Python class, expose its methods as keywords via the `@keyword` decorator, and import the library directly into a suite.
59

6-
## What This Demonstrates
710

811
- Writing a custom Robot Framework library as a plain Python class (`CustomLibrary.py`)
912
- Exposing Python methods as RF keywords with `@keyword` from `robot.api.deco`
@@ -17,17 +20,13 @@ Demonstrates how to write a simple Python class, expose its methods as keywords
1720
| `Test Hello` | Calls the `Say Hello` keyword and logs a greeting |
1821
| `Test Addition` | Calls `Add Numbers` with two integers and logs the result |
1922

20-
## Key Files
21-
22-
| File | Purpose |
23-
|---|---|
24-
| `suite.robot` | Suite importing `CustomLibrary.py` with two test cases |
25-
| `CustomLibrary.py` | Custom library with `Say Hello` and `Add Numbers` keywords |
26-
| `conda.yaml` | Python environment (Python `{{ python_version }}`, robotframework `{{ rf_version }}`) |
27-
| `robot.yaml` | RCC task and environment configuration |
2823

2924
## Links
3025

26+
### Recommended links for this example
3127
- [Robot Framework — Extending with Python](https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#creating-test-libraries)
28+
29+
### General links & Documentation
30+
3231
- [Robot Framework](https://robotframework.org)
3332
- [Robotmk Homepage](https://robotmk.org)
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
*** Settings ***
2-
Documentation This suite demonstrates the use of a custom library, written with a simple Python class.
2+
Documentation This suite demonstrates the use of a **custom library**, written with a simple Python class.
33
Library CustomLibrary.py
44

55
*** Test Cases ***
66

77
Test Hello
8+
[Documentation] Calls the user keyword "Say Hello"
89
Say Hello Robots
910

1011
Test Addition
12+
[Documentation] Calls the user keyword "Add Numbers" to do a calculation
1113
${result}= Add Numbers 44 11
1214
Log ${result}
Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
# rf-python-varfiles
22

3+
{% include 'how-to-run.partial.md' %}
4+
5+
## About this Robot Framework test
6+
37
Minimal example for loading variables and configuration into a Robot Framework suite from Python and YAML files.
48
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.
59

6-
## What This Demonstrates
710

811
- Exposing computed scalar values (e.g. current user, timestamp) from a Python variable file
912
- Accessing values from a nested dict loaded via a Python variable file using the `[key]` subscript syntax
@@ -20,20 +23,13 @@ Demonstrates the three variable file patterns supported by RF: plain scalars, ne
2023
| `Test YML-Nested` | How to load a nested data structure from a YAML variable file |
2124
| `Test Get-Variables With Argument` | How to use `get_variables()` to return different variable sets based on an argument passed at import time |
2225

23-
## Key Files
24-
25-
| File | Purpose |
26-
|---|---|
27-
| `suite.robot` | Suite importing all four variable files and demonstrating each pattern |
28-
| `Data/pyvars-simple.py` | Plain variable file with computed scalars (user, timestamp, random int) |
29-
| `Data/pyvars-nested.py` | Nested environment config dict (`dev` / `test` / `prod`) |
30-
| `Data/ymlvars-nested.yaml` | Same environment config structure as a YAML variable file |
31-
| `Data/pyvars-getvariables.py` | `get_variables(browser)` returning browser-specific config profiles |
32-
| `conda.yaml` | Python environment (Python `{{ python_version }}`, robotframework `{{ rf_version }}`) |
33-
| `robot.yaml` | RCC task and environment configuration |
3426

3527
## Links
3628

29+
### Recommended links for this example
3730
- [Robot Framework — Variable Files](https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#variable-files)
31+
32+
### General links & Documentation
33+
3834
- [Robot Framework](https://robotframework.org)
3935
- [Robotmk Homepage](https://robotmk.org)

_dev/_examples/rf-python-varfiles/template/suite.robot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
*** Settings ***
2-
Documentation This suite demonstrates how to load variables from Python and YAML variable files.
2+
Documentation A suite to demonstrate how to load **variables** from **Python**, **JSON** and **YAML** variable files, including nested data structures.
33
Variables Data/pyvars-simple.py
44
Variables Data/pyvars-nested.py
55
Variables Data/pyvars-getvariables.py ${BROWSER}
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
# web-cryptolibrary
22

3+
{% include 'how-to-run.partial.md' %}
4+
5+
## About this Robot Framework test
6+
37
Example combining [robotframework-browser](https://robotframework-browser.org) (Playwright) with
48
[robotframework-crypto](https://github.com/Snooz82/robotframework-crypto).
59
Shows how to safely inject an encrypted password into a web login form without ever
610
exposing the plaintext in suite files.
711

8-
## What This Demonstrates
912

1013
- Browser-based login using Playwright (`rfbrowser`) together with CryptoLibrary
1114
- The difference between a clear-text password (negative example) and an encrypted password (recommended)
@@ -19,19 +22,16 @@ exposing the plaintext in suite files.
1922
| `Login With Clear Text Password` | **Negative example** — logs in with a hardcoded plaintext password. Never do this in production. |
2023
| `Login With CryptoLibrary` | **Recommended** — decrypts the stored `crypt:…` password at runtime and uses `Fill Secret` |
2124

22-
## Key Files
23-
24-
| File | Purpose |
25-
|---|---|
26-
| `suite.robot` | Two test cases on [practicetestautomation.com](https://practicetestautomation.com/practice-test-login/) |
27-
| `conda.yaml` | Environment (Python `{{ python_version }}`, Browser `{{ rf_lib_browser_version }}`, Crypto `{{ rf_lib_crypto_version }}`) |
28-
| `robot.toml` | Sets `RMKCRYPTPW` (key password) and `ROBOTMK_HEADLESS_HOST` |
29-
| `keys/private_key.json` | Demo private key for credential decryption |
30-
| `.devcontainer/devcontainer.json` | Devcontainer with noVNC desktop (port 6080) for headed browser testing |
3125

3226
## Links
3327

34-
- [robotframework-browser](https://robotframework-browser.org)
28+
### Recommended links for this example
29+
30+
- [Robotmk Blog: How to use the CryptoLibrary](https://www.robotmk.org/en/blog/cryptolibrary/)
31+
32+
### General links & Documentation
33+
3534
- [robotframework-crypto](https://github.com/Snooz82/robotframework-crypto)
35+
- [robotframework-browser](https://robotframework-browser.org)
3636
- [Practice Test Automation – Login page](https://practicetestautomation.com/practice-test-login/)
3737
- [Robotmk Homepage](https://robotmk.org)

0 commit comments

Comments
 (0)