robotframework-plugins 2026.11.0.dev1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (195) hide show
  1. robotframework_plugins/__init__.py +14 -0
  2. robotframework_plugins/_assets/catalog.json +143 -0
  3. robotframework_plugins/_assets/plugins/rf-agentskills/.claude-plugin/plugin.json +25 -0
  4. robotframework_plugins/_assets/plugins/rf-agentskills/CHANGELOG.md +198 -0
  5. robotframework_plugins/_assets/plugins/rf-agentskills/README.md +27 -0
  6. robotframework_plugins/_assets/plugins/rf-agentskills/catalog.yaml +25 -0
  7. robotframework_plugins/_assets/plugins/rf-api/.claude-plugin/plugin.json +25 -0
  8. robotframework_plugins/_assets/plugins/rf-api/CHANGELOG.md +9 -0
  9. robotframework_plugins/_assets/plugins/rf-api/README.md +27 -0
  10. robotframework_plugins/_assets/plugins/rf-api/catalog.yaml +27 -0
  11. robotframework_plugins/_assets/plugins/rf-api/skills/rf-requests/SKILL.md +110 -0
  12. robotframework_plugins/_assets/plugins/rf-api/skills/rf-requests/assets/examples/authentication-patterns.robot +39 -0
  13. robotframework_plugins/_assets/plugins/rf-api/skills/rf-requests/assets/examples/basic-crud.robot +46 -0
  14. robotframework_plugins/_assets/plugins/rf-api/skills/rf-requests/assets/examples/file-upload.robot +28 -0
  15. robotframework_plugins/_assets/plugins/rf-api/skills/rf-requests/assets/examples/session-handling.robot +48 -0
  16. robotframework_plugins/_assets/plugins/rf-api/skills/rf-requests/references/authentication.md +58 -0
  17. robotframework_plugins/_assets/plugins/rf-api/skills/rf-requests/references/install.md +10 -0
  18. robotframework_plugins/_assets/plugins/rf-api/skills/rf-requests/references/request-options.md +90 -0
  19. robotframework_plugins/_assets/plugins/rf-api/skills/rf-requests/references/response-validation.md +64 -0
  20. robotframework_plugins/_assets/plugins/rf-api/skills/rf-requests/references/troubleshooting.md +64 -0
  21. robotframework_plugins/_assets/plugins/rf-api/skills/rf-restinstance/SKILL.md +119 -0
  22. robotframework_plugins/_assets/plugins/rf-api/skills/rf-restinstance/assets/examples/basic-rest.robot +51 -0
  23. robotframework_plugins/_assets/plugins/rf-api/skills/rf-restinstance/assets/examples/schema-validation.robot +38 -0
  24. robotframework_plugins/_assets/plugins/rf-api/skills/rf-restinstance/assets/examples/schemas/user.json +10 -0
  25. robotframework_plugins/_assets/plugins/rf-api/skills/rf-restinstance/references/authentication.md +61 -0
  26. robotframework_plugins/_assets/plugins/rf-api/skills/rf-restinstance/references/install.md +11 -0
  27. robotframework_plugins/_assets/plugins/rf-api/skills/rf-restinstance/references/json-handling.md +89 -0
  28. robotframework_plugins/_assets/plugins/rf-api/skills/rf-restinstance/references/migrate-from-requests.md +15 -0
  29. robotframework_plugins/_assets/plugins/rf-api/skills/rf-restinstance/references/schema-validation.md +85 -0
  30. robotframework_plugins/_assets/plugins/rf-api/skills/rf-restinstance/references/troubleshooting.md +68 -0
  31. robotframework_plugins/_assets/plugins/rf-core/.claude-plugin/plugin.json +19 -0
  32. robotframework_plugins/_assets/plugins/rf-core/CHANGELOG.md +11 -0
  33. robotframework_plugins/_assets/plugins/rf-core/README.md +38 -0
  34. robotframework_plugins/_assets/plugins/rf-core/agents/rf-debug-expert.md +104 -0
  35. robotframework_plugins/_assets/plugins/rf-core/agents/rf-migration-guide.md +73 -0
  36. robotframework_plugins/_assets/plugins/rf-core/agents/rf-test-architect.md +98 -0
  37. robotframework_plugins/_assets/plugins/rf-core/catalog.yaml +19 -0
  38. robotframework_plugins/_assets/plugins/rf-core/hooks/README.md +435 -0
  39. robotframework_plugins/_assets/plugins/rf-core/hooks/hooks.json +70 -0
  40. robotframework_plugins/_assets/plugins/rf-core/scripts/_hook_input.mjs +101 -0
  41. robotframework_plugins/_assets/plugins/rf-core/scripts/_pending_errors.mjs +65 -0
  42. robotframework_plugins/_assets/plugins/rf-core/scripts/_python_env.mjs +181 -0
  43. robotframework_plugins/_assets/plugins/rf-core/scripts/check_rf_environment.mjs +181 -0
  44. robotframework_plugins/_assets/plugins/rf-core/scripts/maybe_inject_rf_context.mjs +74 -0
  45. robotframework_plugins/_assets/plugins/rf-core/scripts/maybe_remind_robot_tests.mjs +108 -0
  46. robotframework_plugins/_assets/plugins/rf-core/scripts/report_pending_errors.mjs +72 -0
  47. robotframework_plugins/_assets/plugins/rf-core/scripts/rf_error_hints.mjs +126 -0
  48. robotframework_plugins/_assets/plugins/rf-core/scripts/validate_robot.mjs +509 -0
  49. robotframework_plugins/_assets/plugins/rf-core/scripts/validate_robot_project.mjs +103 -0
  50. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/SKILL.md +313 -0
  51. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/resources/api.resource +30 -0
  52. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/resources/calc.resource +23 -0
  53. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/resources/embedded.resource +20 -0
  54. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/resources/keywords.resource +26 -0
  55. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/resources/login.resource +10 -0
  56. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/tests/01__keyword_driven.robot +15 -0
  57. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/tests/02__data_driven.robot +10 -0
  58. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/tests/03__templates.robot +17 -0
  59. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/tests/04__bdd.robot +10 -0
  60. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/tests/05__embedded.robot +13 -0
  61. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/tests/__init__.robot +6 -0
  62. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/tests/api/__init__.robot +7 -0
  63. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/tests/api/users.robot +18 -0
  64. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/tests/env.robot +15 -0
  65. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/variables/common.py +11 -0
  66. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/variables/dev.yaml +3 -0
  67. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/variables/staging.yaml +3 -0
  68. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/references/arguments.md +139 -0
  69. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/references/control-structures.md +175 -0
  70. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/references/embedded-arguments.md +135 -0
  71. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/references/migration.md +90 -0
  72. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/references/resources-and-variable-files.md +127 -0
  73. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/references/styles.md +92 -0
  74. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/references/suites-and-init.md +96 -0
  75. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/references/tags-and-selection.md +104 -0
  76. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/references/templates.md +124 -0
  77. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/references/variables-and-scopes.md +129 -0
  78. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/scripts/rf_conventions.py +883 -0
  79. robotframework_plugins/_assets/plugins/rf-core/skills/rf-python-library/SKILL.md +216 -0
  80. robotframework_plugins/_assets/plugins/rf-core/skills/rf-python-library/assets/examples/ExampleLibrary.py +61 -0
  81. robotframework_plugins/_assets/plugins/rf-core/skills/rf-python-library/assets/examples/ResultListener.py +60 -0
  82. robotframework_plugins/_assets/plugins/rf-core/skills/rf-python-library/assets/examples/converters.py +48 -0
  83. robotframework_plugins/_assets/plugins/rf-core/skills/rf-python-library/assets/examples/converters.robot +20 -0
  84. robotframework_plugins/_assets/plugins/rf-core/skills/rf-python-library/assets/examples/example_library.robot +31 -0
  85. robotframework_plugins/_assets/plugins/rf-core/skills/rf-python-library/assets/examples/listener.robot +12 -0
  86. robotframework_plugins/_assets/plugins/rf-core/skills/rf-python-library/references/api-variants.md +291 -0
  87. robotframework_plugins/_assets/plugins/rf-core/skills/rf-python-library/references/communication.md +248 -0
  88. robotframework_plugins/_assets/plugins/rf-core/skills/rf-python-library/references/conversion.md +347 -0
  89. robotframework_plugins/_assets/plugins/rf-core/skills/rf-python-library/references/listeners.md +150 -0
  90. robotframework_plugins/_assets/plugins/rf-core/skills/rf-python-library/references/packaging-and-docs.md +155 -0
  91. robotframework_plugins/_assets/plugins/rf-core/skills/rf-python-library/scripts/check_library.py +842 -0
  92. robotframework_plugins/_assets/plugins/rf-core/skills/rf-setup/SKILL.md +159 -0
  93. robotframework_plugins/_assets/plugins/rf-core/skills/rf-setup/assets/examples/github-actions-robot.yml +32 -0
  94. robotframework_plugins/_assets/plugins/rf-core/skills/rf-setup/assets/examples/gitignore.txt +22 -0
  95. robotframework_plugins/_assets/plugins/rf-core/skills/rf-setup/assets/examples/pyproject.poetry.toml +28 -0
  96. robotframework_plugins/_assets/plugins/rf-core/skills/rf-setup/assets/examples/pyproject.uv.toml +20 -0
  97. robotframework_plugins/_assets/plugins/rf-core/skills/rf-setup/assets/examples/requirements.txt +9 -0
  98. robotframework_plugins/_assets/plugins/rf-core/skills/rf-setup/assets/examples/robot.toml +16 -0
  99. robotframework_plugins/_assets/plugins/rf-core/skills/rf-setup/assets/examples/smoke.robot +22 -0
  100. robotframework_plugins/_assets/plugins/rf-core/skills/rf-setup/references/ci.md +61 -0
  101. robotframework_plugins/_assets/plugins/rf-core/skills/rf-setup/references/cli-tools.md +33 -0
  102. robotframework_plugins/_assets/plugins/rf-core/skills/rf-setup/references/libraries.md +47 -0
  103. robotframework_plugins/_assets/plugins/rf-core/skills/rf-setup/references/poetry.md +77 -0
  104. robotframework_plugins/_assets/plugins/rf-core/skills/rf-setup/references/project-layout.md +86 -0
  105. robotframework_plugins/_assets/plugins/rf-core/skills/rf-setup/references/troubleshooting.md +73 -0
  106. robotframework_plugins/_assets/plugins/rf-core/skills/rf-setup/references/uv.md +108 -0
  107. robotframework_plugins/_assets/plugins/rf-core/skills/rf-setup/references/venv-pip.md +71 -0
  108. robotframework_plugins/_assets/plugins/rf-core/variants/codex/agents/rf-debug-expert.toml +103 -0
  109. robotframework_plugins/_assets/plugins/rf-core/variants/codex/agents/rf-migration-guide.toml +72 -0
  110. robotframework_plugins/_assets/plugins/rf-core/variants/codex/agents/rf-test-architect.toml +97 -0
  111. robotframework_plugins/_assets/plugins/rf-core/variants/opencode/agents/rf-debug-expert.md +107 -0
  112. robotframework_plugins/_assets/plugins/rf-core/variants/opencode/agents/rf-migration-guide.md +76 -0
  113. robotframework_plugins/_assets/plugins/rf-core/variants/opencode/agents/rf-test-architect.md +101 -0
  114. robotframework_plugins/_assets/plugins/rf-core/variants/opencode/plugins/rf-core.js +93 -0
  115. robotframework_plugins/_assets/plugins/rf-desktop/.claude-plugin/plugin.json +24 -0
  116. robotframework_plugins/_assets/plugins/rf-desktop/CHANGELOG.md +9 -0
  117. robotframework_plugins/_assets/plugins/rf-desktop/README.md +26 -0
  118. robotframework_plugins/_assets/plugins/rf-desktop/catalog.yaml +23 -0
  119. robotframework_plugins/_assets/plugins/rf-desktop/skills/rf-platynui/SKILL.md +266 -0
  120. robotframework_plugins/_assets/plugins/rf-desktop/skills/rf-platynui/assets/examples/calculator.robot +45 -0
  121. robotframework_plugins/_assets/plugins/rf-desktop/skills/rf-platynui/assets/examples/mock-deterministic.robot +33 -0
  122. robotframework_plugins/_assets/plugins/rf-desktop/skills/rf-platynui/references/cli-and-inspector.md +82 -0
  123. robotframework_plugins/_assets/plugins/rf-desktop/skills/rf-platynui/references/install.md +14 -0
  124. robotframework_plugins/_assets/plugins/rf-desktop/skills/rf-platynui/references/keywords-reference.md +102 -0
  125. robotframework_plugins/_assets/plugins/rf-desktop/skills/rf-platynui/references/locators-and-queries.md +95 -0
  126. robotframework_plugins/_assets/plugins/rf-desktop/skills/rf-platynui/references/platform-setup.md +65 -0
  127. robotframework_plugins/_assets/plugins/rf-desktop/skills/rf-platynui/references/status-and-migration.md +41 -0
  128. robotframework_plugins/_assets/plugins/rf-mobile/.claude-plugin/plugin.json +24 -0
  129. robotframework_plugins/_assets/plugins/rf-mobile/CHANGELOG.md +9 -0
  130. robotframework_plugins/_assets/plugins/rf-mobile/README.md +26 -0
  131. robotframework_plugins/_assets/plugins/rf-mobile/catalog.yaml +23 -0
  132. robotframework_plugins/_assets/plugins/rf-mobile/skills/rf-appium/SKILL.md +134 -0
  133. robotframework_plugins/_assets/plugins/rf-mobile/skills/rf-appium/assets/examples/android-basic.robot +60 -0
  134. robotframework_plugins/_assets/plugins/rf-mobile/skills/rf-appium/assets/examples/gestures-example.robot +59 -0
  135. robotframework_plugins/_assets/plugins/rf-mobile/skills/rf-appium/assets/examples/hybrid-app.robot +54 -0
  136. robotframework_plugins/_assets/plugins/rf-mobile/skills/rf-appium/assets/examples/ios-basic.robot +48 -0
  137. robotframework_plugins/_assets/plugins/rf-mobile/skills/rf-appium/references/capabilities.md +117 -0
  138. robotframework_plugins/_assets/plugins/rf-mobile/skills/rf-appium/references/gestures-touch.md +84 -0
  139. robotframework_plugins/_assets/plugins/rf-mobile/skills/rf-appium/references/install.md +21 -0
  140. robotframework_plugins/_assets/plugins/rf-mobile/skills/rf-appium/references/locators-mobile.md +74 -0
  141. robotframework_plugins/_assets/plugins/rf-mobile/skills/rf-appium/references/platform-specific.md +105 -0
  142. robotframework_plugins/_assets/plugins/rf-mobile/skills/rf-appium/references/troubleshooting.md +70 -0
  143. robotframework_plugins/_assets/plugins/rf-web/.claude-plugin/plugin.json +25 -0
  144. robotframework_plugins/_assets/plugins/rf-web/CHANGELOG.md +9 -0
  145. robotframework_plugins/_assets/plugins/rf-web/README.md +27 -0
  146. robotframework_plugins/_assets/plugins/rf-web/catalog.yaml +27 -0
  147. robotframework_plugins/_assets/plugins/rf-web/skills/rf-browser/SKILL.md +132 -0
  148. robotframework_plugins/_assets/plugins/rf-web/skills/rf-browser/assets/examples/authentication-flow.robot +34 -0
  149. robotframework_plugins/_assets/plugins/rf-web/skills/rf-browser/assets/examples/basic-web-test.robot +29 -0
  150. robotframework_plugins/_assets/plugins/rf-web/skills/rf-browser/assets/examples/form-handling.robot +49 -0
  151. robotframework_plugins/_assets/plugins/rf-web/skills/rf-browser/assets/examples/iframe-shadow-dom.robot +31 -0
  152. robotframework_plugins/_assets/plugins/rf-web/skills/rf-browser/references/assertion-engine.md +79 -0
  153. robotframework_plugins/_assets/plugins/rf-web/skills/rf-browser/references/authentication-storage.md +86 -0
  154. robotframework_plugins/_assets/plugins/rf-web/skills/rf-browser/references/browser-context-page.md +110 -0
  155. robotframework_plugins/_assets/plugins/rf-web/skills/rf-browser/references/downloads-uploads.md +51 -0
  156. robotframework_plugins/_assets/plugins/rf-web/skills/rf-browser/references/iframes-shadow-dom.md +67 -0
  157. robotframework_plugins/_assets/plugins/rf-web/skills/rf-browser/references/install.md +67 -0
  158. robotframework_plugins/_assets/plugins/rf-web/skills/rf-browser/references/locators.md +83 -0
  159. robotframework_plugins/_assets/plugins/rf-web/skills/rf-browser/references/migrate-from-selenium.md +22 -0
  160. robotframework_plugins/_assets/plugins/rf-web/skills/rf-browser/references/troubleshooting.md +100 -0
  161. robotframework_plugins/_assets/plugins/rf-web/skills/rf-selenium/SKILL.md +123 -0
  162. robotframework_plugins/_assets/plugins/rf-web/skills/rf-selenium/assets/examples/basic-web-test.robot +64 -0
  163. robotframework_plugins/_assets/plugins/rf-web/skills/rf-selenium/assets/examples/multi-window.robot +55 -0
  164. robotframework_plugins/_assets/plugins/rf-web/skills/rf-selenium/assets/examples/wait-patterns.robot +53 -0
  165. robotframework_plugins/_assets/plugins/rf-web/skills/rf-selenium/references/browser-setup.md +103 -0
  166. robotframework_plugins/_assets/plugins/rf-web/skills/rf-selenium/references/frames-windows.md +84 -0
  167. robotframework_plugins/_assets/plugins/rf-web/skills/rf-selenium/references/install.md +12 -0
  168. robotframework_plugins/_assets/plugins/rf-web/skills/rf-selenium/references/javascript-execution.md +65 -0
  169. robotframework_plugins/_assets/plugins/rf-web/skills/rf-selenium/references/locators.md +86 -0
  170. robotframework_plugins/_assets/plugins/rf-web/skills/rf-selenium/references/troubleshooting.md +122 -0
  171. robotframework_plugins/_assets/plugins/rf-web/skills/rf-selenium/references/waiting-strategies.md +84 -0
  172. robotframework_plugins/_assets.py +120 -0
  173. robotframework_plugins/_catalog.py +123 -0
  174. robotframework_plugins/_snapshot.py +230 -0
  175. robotframework_plugins/adapters/__init__.py +53 -0
  176. robotframework_plugins/adapters/_base.py +400 -0
  177. robotframework_plugins/adapters/claude_code.py +312 -0
  178. robotframework_plugins/adapters/claude_desktop.py +129 -0
  179. robotframework_plugins/adapters/codex.py +276 -0
  180. robotframework_plugins/adapters/copilot.py +87 -0
  181. robotframework_plugins/adapters/cursor.py +295 -0
  182. robotframework_plugins/adapters/goose.py +240 -0
  183. robotframework_plugins/adapters/opencode.py +170 -0
  184. robotframework_plugins/bundle.py +85 -0
  185. robotframework_plugins/cli.py +1311 -0
  186. robotframework_plugins/detect.py +121 -0
  187. robotframework_plugins/manifest.py +338 -0
  188. robotframework_plugins/py.typed +0 -0
  189. robotframework_plugins/skillzip.py +39 -0
  190. robotframework_plugins/transforms.py +725 -0
  191. robotframework_plugins-2026.11.0.dev1.dist-info/METADATA +178 -0
  192. robotframework_plugins-2026.11.0.dev1.dist-info/RECORD +195 -0
  193. robotframework_plugins-2026.11.0.dev1.dist-info/WHEEL +4 -0
  194. robotframework_plugins-2026.11.0.dev1.dist-info/entry_points.txt +2 -0
  195. robotframework_plugins-2026.11.0.dev1.dist-info/licenses/LICENSE +201 -0
@@ -0,0 +1,313 @@
1
+ ---
2
+ name: rf-language
3
+ description: "Use first, before reading .robot/.resource files: Robot Framework tests, keywords, templates, imports."
4
+ license: Apache-2.0
5
+ compatibility: "Requires Python 3.8+ with robotframework>=7 in the project environment for the bundled rf_conventions script; guidance is version-gated from RF 5.0 to 7.4 and the examples need RF 7.0+; robotcode[all]>=2.8 (which includes Robocop) is required in the project environment for keyword lookup, static checks and results."
6
+ metadata:
7
+ author: manykarim
8
+ version: "1.0.0"
9
+ ---
10
+
11
+ # Robot Framework Language
12
+
13
+ Write and review Robot Framework code in `.robot` and `.resource` files: test cases and suites, user keywords, resource files and variables, in modern syntax that fits the project's Robot Framework version.
14
+ Python keyword libraries and listeners belong to rf-python-library; library keywords, locators and waits belong to the library skills (for example rf-browser in plugin rf-web, rf-requests in plugin rf-api).
15
+ Verified against Robot Framework 7.4.2.
16
+
17
+ ## When to use
18
+
19
+ Load this skill first, before opening the .robot and .resource files or answering from memory, when Robot Framework test data is written, changed, reviewed or explained, even if the user just says "tests" or "keywords":
20
+
21
+ - test cases and suites, user keywords and variables in .resource files, tags, setups and teardowns, `__init__.robot` suite files;
22
+ - data-driven tests with a Test Template table; Given/When/Then (BDD) scenarios and their step keywords;
23
+ - `[Arguments]` (optional, typed or embedded); replacing Force Tags, `[Return]`, Run Keyword If or Set Suite Variable with current syntax;
24
+ - selecting tests by tag on the robot command line;
25
+ - `Multiple keywords with name '...'` and import scope between `__init__.robot` and child suites.
26
+
27
+ Not this skill: Python keyword libraries or listeners use `rf-python-library`; library keywords use `rf-browser` (plugin `rf-web`), `rf-requests` (plugin `rf-api`) or another library skill. Running, discovering, keyword lookup, result reading and debugging with the robotcode CLI are covered by the `robotcode` skill of the robotcode plugin.
28
+
29
+ ## Version gate
30
+
31
+ Establish the project's Robot Framework version once, before writing version-dependent syntax. Use `rf.effective` and `rf.features` from Step 0, or run this in the project (it exits 0; `robot --version` prints the version but exits 251):
32
+
33
+ ```bash
34
+ uv run python -c "import robot; print(robot.__version__)"
35
+ ```
36
+
37
+ | Feature | Min RF |
38
+ |---|---|
39
+ | `RETURN` | 5.0 |
40
+ | `Test Tags`, `Keyword Tags`, `robot:private` | 6.0 |
41
+ | `--parseinclude`, suite `Name` setting, JSON variable files, embedded + normal arguments in one user keyword | 6.1 |
42
+ | `VAR`, `[Tags] -tag` removal, `--test` matching the full name from the root suite | 7.0 |
43
+ | `VAR … scope=SUITES`, BDD prefix before a leading embedded argument | 7.1 |
44
+ | `GROUP`, `(?i)` in embedded patterns, templated test passes when some rows skip | 7.2 |
45
+ | Typed user keyword arguments `${count: int}`, typed `VAR`, Variables section and `FOR` variables | 7.3 |
46
+ | `Secret` type | 7.4 |
47
+
48
+ - Do not use a feature newer than the project's version. On RF 7.1, for example: no `GROUP`, no `(?i)` pattern and no `${name: type}` in `[Arguments]`, `VAR` or the Variables section.
49
+ - Native typed arguments only on RF 7.3 or newer. On older versions keep `${count}` and convert explicitly (`${count}= Convert To Integer ${count}`).
50
+ - `${count}: int` is invalid on every version. `${count: int}` on RF < 7.3 passes `robot --dryrun` and fails at run time.
51
+
52
+ ## Step 0: Match the project
53
+
54
+ Detect the project's conventions before writing code, and follow them. Use the first of these that works:
55
+
56
+ 1. The bundled script, run through the project environment. Script paths are relative to this skill's directory (the folder containing this SKILL.md), not to the project:
57
+
58
+ ```bash
59
+ uv run python "${CLAUDE_SKILL_DIR}/scripts/rf_conventions.py" .
60
+ uv run python "${CLAUDE_SKILL_DIR}/scripts/rf_conventions.py" tests --max-examples 5
61
+ uv run python "${CLAUDE_SKILL_DIR}/scripts/rf_conventions.py" . --json-out results/conventions.json
62
+ ```
63
+
64
+ Project not managed by uv (no `uv.lock`)? Run it with the project's interpreter: `.venv/bin/python "${CLAUDE_SKILL_DIR}/scripts/rf_conventions.py" .` or `poetry run python "${CLAUDE_SKILL_DIR}/scripts/rf_conventions.py" .` (see rf-setup).
65
+
66
+ 2. Without Robot Framework for the script, three searches, then read one existing file for the separator width:
67
+
68
+ ```bash
69
+ grep -rhoE '^(Library|Resource|Variables)\s+\S+' --include='*.robot' --include='*.resource' . | sort | uniq -c
70
+ grep -rhoE '^\s+(Given|When|Then|And|But) |^Test Template|^\s+\[Template\]' --include='*.robot' --include='*.resource' . | sed -E 's/^\s+//' | sort | uniq -c
71
+ grep -rhE '^(Test Tags|Force Tags|Default Tags)|^\s+\[Tags\]' --include='*.robot' --include='*.resource' . | sed -E 's/^\s+//' | sort | uniq -c
72
+ ```
73
+
74
+ | Result field | Follow it |
75
+ |---|---|
76
+ | `style.separator.dominant`, `style.assignment.dominant` | Same separator width and `${x}=` / `${x} =` / `${x}` style in new code |
77
+ | `style.keyword_case`, `keywords.embedded`, `advice` `follow-embedded-style` | Same keyword-name casing; write new keywords of the same kind with embedded arguments |
78
+ | `rf.features.typed_arguments.available` | Typed arguments only when `true` |
79
+ | `libraries.web_library`, `libraries.imports` | Keep the web or API library the project uses |
80
+ | `layout.resource_dir`, `layout.variable_files` | Put new keywords and variable files where the existing ones are |
81
+ | `calls.bdd_steps`, `tests.template_suites`, `tests.top_tags` | Keep BDD, template and tag vocabulary consistent |
82
+ | `keywords.duplicate_names`, `legacy` | Fix or avoid them; `advice` names the robocop rules |
83
+
84
+ Search for an existing keyword before creating one: `robotcode doc keywords resources/<file>.resource "<text>"` lists what a resource file exports (`robotcode discover tests --search "<text>"` finds similar tests).
85
+
86
+ ## Choose a style
87
+
88
+ | Situation | Use |
89
+ |---|---|
90
+ | One workflow per test (set up, act, verify) | Keyword-driven test calling user keywords |
91
+ | The same workflow with varying data | Data-driven: `Test Template` or `[Template]` with one data row per test |
92
+ | Scenarios that stakeholders read | BDD: `Given`/`When`/`Then` calls to prefix-free step keywords with embedded arguments |
93
+ | Large or externally maintained data sets | An external data source such as DataDriver, installed via rf-setup |
94
+ | Steps repeated across tests | A user keyword in a resource file |
95
+ | Logic that needs Python (parsing, protocols, heavy computation) | A Python keyword library: logic goes into Python, composition of existing keywords into a user keyword |
96
+
97
+ ## Test skeletons
98
+
99
+ Keyword-driven (`assets/examples/tests/01__keyword_driven.robot`):
100
+
101
+ ```robotframework
102
+ *** Settings ***
103
+ Resource ../resources/calc.resource
104
+ Test Setup The Calculator Is Cleared
105
+
106
+ *** Test Cases ***
107
+ Adding Two Numbers
108
+ [Tags] smoke
109
+ The User Adds 1 And 2
110
+ The Result Should Be 3
111
+
112
+ Test Without Setup
113
+ [Setup] NONE
114
+ No Operation
115
+ ```
116
+
117
+ Data-driven, one test per row, header cells name the columns (`assets/examples/tests/02__data_driven.robot`):
118
+
119
+ ```robotframework
120
+ *** Settings ***
121
+ Resource ../resources/login.resource
122
+ Test Template Login Should Fail
123
+
124
+ *** Test Cases *** USERNAME PASSWORD
125
+ Invalid User Name invalid mode
126
+ Invalid Password demo invalid
127
+ Empty User Name ${EMPTY} mode
128
+ ```
129
+
130
+ BDD, with the step keywords defined without a prefix in `calc.resource` (`assets/examples/tests/04__bdd.robot`):
131
+
132
+ ```robotframework
133
+ *** Settings ***
134
+ Resource ../resources/calc.resource
135
+
136
+ *** Test Cases ***
137
+ Adding Two Numbers As A Scenario
138
+ Given The Calculator Is Cleared
139
+ When The User Adds 2 And 3
140
+ Then The Result Should Be 5
141
+ ```
142
+
143
+ ## Keyword anatomy
144
+
145
+ Default template, settings in the Robocop ORD02 order (`[Documentation]`, `[Tags]`, `[Arguments]`, `[Timeout]`, `[Setup]`, body, `[Teardown]`); typed arguments need RF 7.3 (`assets/examples/resources/keywords.resource`):
146
+
147
+ ```robotframework
148
+ *** Settings ***
149
+ Library Collections
150
+
151
+ *** Keywords ***
152
+ Add Items To Cart
153
+ [Documentation] Adds ``quantity`` items of ``product`` and returns the cart size.
154
+ [Tags] cart
155
+ [Arguments] ${cart: list} ${product: str} ${quantity: int}=1
156
+ [Timeout] 10 seconds
157
+ [Setup] Log Adding ${quantity} x ${product}
158
+ FOR ${_} IN RANGE ${quantity}
159
+ Append To List ${cart} ${product}
160
+ END
161
+ ${total}= Get Length ${cart}
162
+ RETURN ${total}
163
+ [Teardown] Log Cart has ${total} items
164
+ ```
165
+
166
+ On RF < 7.3 the same keyword takes `[Arguments] ${cart} ${product} ${quantity}=1` and converts with `Convert To Integer`. Name keywords as Title Case sentences without underscores (`Add Items To Cart`), unless `rf_conventions` reports another dominant style.
167
+
168
+ | Need | Write |
169
+ |---|---|
170
+ | Required value | `${product}` |
171
+ | Optional value | `${quantity}=1`, `${note}=${EMPTY}`; a default may use an earlier argument: `${to}=${from}` |
172
+ | Any number of values | `@{items}` after the positional arguments |
173
+ | Options that must be named | Arguments after `@{items}` (or after a bare `@{}`): `@{} ${timeout}=10s` |
174
+ | Free-form named options | `&{options}`, always last |
175
+ | Values inside the sentence | Embedded arguments: `Select Team "${city}" "${team}"` |
176
+ | Conversion or validation | Types on RF 7.3+: `${count: int}`, `${mode: Literal["fast", "safe"]}` |
177
+
178
+ - Named arguments are written literally (`timeout=5s`). A variable that contains `timeout=5s` is passed as a positional value.
179
+ - A wrapper forwards everything: `[Arguments] @{args} &{kwargs}` and calls `Inner Keyword @{args} &{kwargs}`.
180
+ - Embedded arguments: case-insensitive match, spaces and underscores count, no defaults or varargs. Quote adjacent values or give the last one a pattern (`${team:\S+}`); details in `references/embedded-arguments.md`.
181
+
182
+ ## Setup, teardown and suite files
183
+
184
+ - A setup or teardown is exactly one keyword call. Put several steps in a user keyword.
185
+ - A test's `[Setup]`/`[Teardown]` replaces the suite's `Test Setup`/`Test Teardown`; it does not add to it. `NONE` disables it.
186
+ - A teardown runs when the test or suite fails, and it continues when one of its steps fails.
187
+ - A failed suite setup fails every test in the suite without running them; the suite teardown still runs.
188
+ - Keywords and variables defined in `__init__.robot` are not visible to child suites. A `Test Setup` or `Test Teardown` set in `__init__.robot` is resolved in each child suite, so every child imports the resource that defines that keyword. Defining it in the init file's own `*** Keywords ***` section fails with "No keyword with name … found". `Test Template` is not allowed in `__init__.robot`.
189
+ - Running a child file or directory directly skips the parent `__init__.robot`. Run the root with `--suite` or `--test`.
190
+ - `01__login.robot` style prefixes order suites and are removed from suite names.
191
+
192
+ `assets/examples/tests/api/__init__.robot`; `users.robot` imports `api.resource` too:
193
+
194
+ ```robotframework
195
+ *** Settings ***
196
+ Documentation API suite: one session for all API tests.
197
+ Resource ../../resources/api.resource
198
+ Suite Setup Open Api Session
199
+ Suite Teardown Close Api Session
200
+ Test Tags api
201
+ ```
202
+
203
+ ## Tags and selection
204
+
205
+ - Suite-wide tags go in `Test Tags`; per-test tags in `[Tags]`. `[Tags] -smoke` removes a suite tag from one test (RF 7.0+). `Force Tags` and `Default Tags` are legacy; robocop flags `Force Tags` (DEPR07).
206
+ - Reserved tags use the `robot:` prefix: `robot:skip`, `robot:exclude`, `robot:skip-on-failure`, `robot:continue-on-failure`, `robot:stop-on-failure`, `robot:no-dry-run` (on keywords), `robot:private` (on keywords), `robot:flatten`. Do not invent other `robot:` tags (robocop TAG03).
207
+ - Tags match case-, space- and underscore-insensitively: `S_M O K E` selects `smoke`.
208
+ - Quote tag patterns and write operators in upper case: `"smoke NOT slow"`, `"api AND smoke"`, `"smoke OR regression"`. A lower-case `not` is part of the tag name.
209
+
210
+ | Goal | Command | Tests in `assets/examples` |
211
+ |---|---|---|
212
+ | Smoke but not slow | `robot --include "smoke NOT slow" tests` | 2 |
213
+ | One test by full name from the root suite | `robot --test "Tests.Api.Users.Create User" tests` | 1 |
214
+ | Same test by pattern | `robot --test "*.Users.Create User" tests` | 1 |
215
+ | One suite, with its parent init files | `robot --suite users tests` | 3 |
216
+ | Parse only some files | `robot --parseinclude "02__*.robot" tests` | 3 |
217
+ | Run but skip a tag | `robot --skip slow tests` | 14 |
218
+
219
+ Turn failures of known-flaky tests into skips with `--skiponfailure flaky`; re-run failures with `--rerunfailed results/output.xml --output rerun.xml` and merge with `rebot --merge` (it errors when nothing failed). More in `references/tags-and-selection.md`.
220
+
221
+ ## Variables and resources
222
+
223
+ - `VAR` (RF 7.0+) creates variables: `VAR ${TOKEN} abc scope=SUITE`. Scopes: `LOCAL` (default), `TEST`, `SUITE`, `SUITES` (7.1+), `GLOBAL`.
224
+ - Upper case for non-local variables, lower case for locals and arguments.
225
+ - Priority: `--variable` over `--variablefile` over the suite's own `*** Variables ***` over imported resources and variable files (the first import wins).
226
+ - Default layout: the detected resource directory, else `resources/`; `common.resource` with shared imports; one `<domain>.resource` per domain; `variables/<env>.yaml` selected with `--variablefile`. Never overwrite an existing file unless asked.
227
+ - Resource files hold keywords and variables only: no tests, and only imports, `Documentation` and `Keyword Tags` in Settings. Import with paths relative to the importing file or `${CURDIR}`.
228
+ - YAML variable files need PyYAML in the project (`uv add pyyaml`); JSON variable files need nothing extra.
229
+
230
+ | Legacy | Write instead |
231
+ |---|---|
232
+ | `[Return] ${x}` | `RETURN ${x}` |
233
+ | `Run Keyword If $x Kw` | `IF $x Kw` (inline) or an `IF`/`END` block |
234
+ | `Set Suite Variable ${X} 1` | `VAR ${X} 1 scope=SUITE` |
235
+ | `Create List a b` | `VAR @{items} a b` |
236
+ | `Force Tags api` | `Test Tags api` |
237
+
238
+ The full table with minimum versions and robocop rule IDs is `references/migration.md`.
239
+
240
+ ## Agent workflow
241
+
242
+ 1. Run the version gate and Step 0.
243
+ 2. Look up the signatures of the library keywords and existing user keywords you plan to call: `robotcode doc keyword <Library or resources/file.resource> "<Keyword>"`.
244
+ 3. Write or restructure the code. Every new file starts with its section header.
245
+ 4. Dry run the changed suites from the project environment: `uv run robot --dryrun --outputdir results tests`. The dry run does not catch:
246
+ - undefined or misspelled variables;
247
+ - a space before `=` in a named argument (`timeout =5s` becomes a positional value);
248
+ - wrong embedded-argument binding, including BDD steps matching an unintended keyword;
249
+ - union-with-`str` conversion surprises (`${v: int | str}` keeps `"10"` a string), and typed arguments on RF < 7.3.
250
+ These need a real run of at least one affected test before you report success.
251
+ 5. Lint with `--target-version` set to the project's RF major version: `uv run robocop check --no-cache --target-version 7 -s "DEPR*" -s "ERR*" -s ORD02 -s "NAME*" -s VAR07 -s ARG03 tests resources` (repeat `-s`; a comma list is rejected), plus `-s KW06` for keyword name conflicts. Fix what it reports in the code you wrote.
252
+ 6. Check the changed files statically: `uv run robotcode analyze code <changed files>`, and fix every error.
253
+ 7. Run the affected tests for real by longname, `uv run robotcode robot -bl "<Suite.Sub.Test>"` (longnames from `robotcode discover tests`), or a whole directory, so that `__init__.robot` files apply. Don't pass a single `.robot` file.
254
+ 8. Read the results: `uv run robotcode results show --failed`, then `uv run robotcode results log -bl "<longname>"`.
255
+ 9. Fix and repeat from step 4.
256
+
257
+ If robotcode or Robocop is missing from the project environment, report steps 5–8 as skipped instead of passed, and point to rf-setup for `robotcode[all]`.
258
+
259
+ ## Gotchas
260
+
261
+ - A templated test runs every row even after a failure (`[Template]` rows continue on failure): it fails if any row fails and is skipped only if all rows skip. Do not wrap rows in `TRY`; tag the test `robot:stop-on-failure` to stop at the first failure.
262
+ - `Test Template` in `__init__.robot` is rejected with "not allowed in suite initialization file"; set it per suite file. `[Template] NONE` turns a suite template off for one test.
263
+ - `*` and `?` in a test name act as wildcards in `--test` (`--test "Login ?"` also selects `Login A`); keep them out of test names.
264
+ - `Kw timeout =5s` passes the string `timeout =5s` positionally, and the dry run does not notice; write `timeout=5s`, and `foo\=bar` for a literal `=`.
265
+ - `FOR`, `WHILE`, `IF` and `TRY` in a test body hide the test's intent; move the logic into a user keyword. The one exception is a `FOR` or `IF` in a templated test that feeds data rows.
266
+ - `Force Tags` and `Default Tags` are legacy: use `Test Tags` and `[Tags] -tag`. Invented `robot:` tags are reserved words (robocop TAG03).
267
+ - Unquoted or lower-case tag patterns break selection: `--include "smoke not slow"` selects nothing; write `"smoke NOT slow"`.
268
+ - `[Setup]` in a test replaces `Test Setup`, a setup takes one keyword only, and a failed `Suite Setup` fails every child test without running it.
269
+ - Keywords in `__init__.robot` are not visible to child suites, and `Test Setup` from an init file fails with "No keyword with name" unless each child imports the resource that defines it.
270
+ - `robot tests/api/users.robot` skips `tests/api/__init__.robot` and its suite setup; run `robot --suite users tests`.
271
+ - `[Arguments] ${count}: int` is invalid ("Invalid argument syntax"); `${count: int}` needs RF 7.3 and on older versions passes the dry run, then fails at run time.
272
+ - `Select Team ${city} ${team}` called as `Select Team Los Angeles Lakers` binds `city=Los`: adjacent default embedded arguments take the shortest match. If the calls cannot be changed, give the one-word argument a pattern: `Select Team ${city} ${team:\S+}`. Only the `:pattern` part is a regex; the text between arguments is literal, so `${city}\s${team}` never matches. Run the test for real, because a passing dry run does not prove which keyword or binding matched.
273
+ - "No keyword with name 'Select team Los Angeles Lakers' found" for a keyword defined with `[Arguments]` or `@{args}`: the values are part of the called name, so the keyword needs embedded arguments (`Select team ${city} ${team:\S+}`), not `[Arguments]`.
274
+ - BDD step keywords are defined without the prefix (`The Calculator Is Cleared`); a keyword defined as `Given the app is open` cannot be called as `When the app is open`.
275
+ - The same keyword name in two imported resources fails with "Multiple keywords with name 'Open App' found"; call `a.Open App`, set `Set Library Search Order`, or rename one.
276
+ - A YAML variable file without PyYAML fails with "Using YAML variable files requires PyYAML module"; run `uv add pyyaml`.
277
+ - `Set Test Variable` in a suite setup is an error before RF 7.2 and, from 7.2, is not visible to the tests; `BREAK` and `CONTINUE` in a called keyword fail with "BREAK is not allowed in this context".
278
+ - An inline IF with no matching branch assigns `None`: `${v}= IF $n > 10 Set Variable big` leaves `${v}` as `None`; add an `ELSE` branch.
279
+ - `Catenate` and `Set Variable If` are not flagged by robocop but have modern forms: `VAR ${s} a b separator=-` and an inline `IF`/`ELSE`.
280
+ - A new file without a section header is not a suite ("contains no tests"); every new `.robot` or `.resource` file starts with `*** Settings ***`, `*** Test Cases ***` or `*** Keywords ***`.
281
+ - Robocop NAME18 flags keyword calls that are not Title Case, BDD steps included; write `Given The Calculator Is Cleared`, not `Given the calculator is cleared`.
282
+
283
+ ## When to read the references
284
+
285
+ | Read | When |
286
+ |---|---|
287
+ | `references/styles.md` | Choosing or converting between keyword-driven, data-driven and BDD tests |
288
+ | `references/templates.md` | Writing `Test Template`/`[Template]` suites, column headers, embedded or looping templates |
289
+ | `references/suites-and-init.md` | Writing `__init__.robot`, suite setup and teardown, suite order and names |
290
+ | `references/tags-and-selection.md` | Tagging tests, reserved `robot:` tags, `--include`/`--test`/`--suite`/`--skip`/`--rerunfailed` |
291
+ | `references/arguments.md` | Designing `[Arguments]`: defaults, varargs, named-only, `&{kwargs}`, types, wrappers |
292
+ | `references/embedded-arguments.md` | Keywords with values inside the name, custom patterns, conflicts, BDD step definitions |
293
+ | `references/variables-and-scopes.md` | `VAR`, scopes, variable priority, `$var` expressions, `Secret` |
294
+ | `references/control-structures.md` | `IF`, `FOR`, `WHILE`, `BREAK`/`CONTINUE`, `TRY`, `GROUP` in keywords, retries |
295
+ | `references/resources-and-variable-files.md` | Organising `.resource` files, imports, variable files per environment, name conflicts |
296
+ | `references/migration.md` | Replacing legacy syntax, with robocop rule IDs |
297
+
298
+ Examples in `assets/examples/` (run `robot --dryrun tests` from that folder):
299
+ - `tests/` with `__init__.robot`, one suite per style (`01__keyword_driven.robot`, `02__data_driven.robot`, `03__templates.robot`, `04__bdd.robot`), `05__embedded.robot`, `env.robot` and `api/` with its own `__init__.robot` (RF 7.0+)
300
+ - `resources/calc.resource`, `login.resource`, `api.resource`, `embedded.resource` (RF 7.0+)
301
+ - `resources/keywords.resource`, the typed keyword template (RF 7.3+)
302
+ - `variables/dev.yaml`, `staging.yaml` (PyYAML) and `common.py` (RF 7.0+)
303
+
304
+ ## Companion Skills
305
+
306
+ | Need | Skill |
307
+ |------|-------|
308
+ | Web UI tests with Browser Library (Playwright) | `rf-browser` (plugin `rf-web`) |
309
+ | API tests with RequestsLibrary | `rf-requests` (plugin `rf-api`) |
310
+ | Install Robot Framework or a library, fix the environment | `rf-setup` |
311
+ | Write or fix a Python keyword library or listener | `rf-python-library` |
312
+
313
+ For running, discovering, keyword documentation, result analysis and debugging with the robotcode CLI, use the `robotcode` skill of the robotcode plugin (`robotcode@robotframework-agent-plugins`); the commands above work without it.
@@ -0,0 +1,30 @@
1
+ # RF 7.0+ example: domain keywords shared by tests/api/__init__.robot and its child suites.
2
+ *** Settings ***
3
+ Documentation API session keywords. A stand-in for keywords built on an API library.
4
+ Library Collections
5
+
6
+ *** Keywords ***
7
+ Open Api Session
8
+ [Documentation] Opens one session for the whole API suite.
9
+ VAR ${API_SESSION} open scope=GLOBAL
10
+ VAR &{USERS} &{EMPTY} scope=GLOBAL
11
+
12
+ Close Api Session
13
+ [Documentation] Closes the session opened by Open Api Session.
14
+ VAR ${API_SESSION} closed scope=GLOBAL
15
+
16
+ Api Session Should Be Open
17
+ [Documentation] Fails unless Open Api Session ran in a parent suite setup.
18
+ Should Be Equal ${API_SESSION} open
19
+
20
+ Create User
21
+ [Documentation] Creates ``name`` and checks that it exists.
22
+ [Arguments] ${name}
23
+ Set To Dictionary ${USERS} ${name}=active
24
+ Dictionary Should Contain Key ${USERS} ${name}
25
+
26
+ Delete User
27
+ [Documentation] Deletes ``name`` and checks that it is gone.
28
+ [Arguments] ${name}
29
+ Remove From Dictionary ${USERS} ${name}
30
+ Dictionary Should Not Contain Key ${USERS} ${name}
@@ -0,0 +1,23 @@
1
+ # RF 7.0+ example: step keywords for keyword-driven, BDD and templated tests.
2
+ *** Settings ***
3
+ Documentation Calculator steps. Defined without Given/When/Then; BDD tests add the prefix.
4
+
5
+ *** Keywords ***
6
+ The Calculator Is Cleared
7
+ [Documentation] Resets the result for the current test.
8
+ VAR ${RESULT} ${0} scope=TEST
9
+
10
+ The User Adds ${a} And ${b}
11
+ [Documentation] Adds two numbers and stores the sum as the result.
12
+ ${sum}= Evaluate int($a) + int($b)
13
+ VAR ${RESULT} ${sum} scope=TEST
14
+
15
+ The Result Should Be ${expected}
16
+ [Documentation] Fails unless the stored result equals ``expected``.
17
+ Should Be Equal As Integers ${RESULT} ${expected}
18
+
19
+ The Result Of ${a} Plus ${b} Should Be ${expected}
20
+ [Documentation] One data row: clear, add, verify.
21
+ The Calculator Is Cleared
22
+ The User Adds ${a} And ${b}
23
+ The Result Should Be ${expected}
@@ -0,0 +1,20 @@
1
+ # RF 7.0+ example: embedded arguments that bind "Los Angeles Lakers" correctly.
2
+ *** Settings ***
3
+ Documentation Two fixes for adjacent embedded arguments: quotes, or a custom pattern.
4
+
5
+ *** Keywords ***
6
+ Select Team "${city}" "${team}"
7
+ [Documentation] Quotes delimit each value, so multi-word cities bind whole.
8
+ VAR ${SELECTED_CITY} ${city} scope=TEST
9
+ VAR ${SELECTED_TEAM} ${team} scope=TEST
10
+
11
+ Pick Team ${city} ${team:\S+}
12
+ [Documentation] The team is one word, so the city takes everything before it.
13
+ VAR ${SELECTED_CITY} ${city} scope=TEST
14
+ VAR ${SELECTED_TEAM} ${team} scope=TEST
15
+
16
+ Selection Should Be
17
+ [Documentation] Fails unless the last selection was ``city`` and ``team``.
18
+ [Arguments] ${city} ${team}
19
+ Should Be Equal ${SELECTED_CITY} ${city}
20
+ Should Be Equal ${SELECTED_TEAM} ${team}
@@ -0,0 +1,26 @@
1
+ # RF 7.3+ example: the default keyword template with typed arguments.
2
+ # On RF 7.0-7.2 drop the types (${quantity}=1) and convert explicitly (see the version gate).
3
+ *** Settings ***
4
+ Documentation Cart keywords in the Robocop ORD02 settings order.
5
+ Library Collections
6
+
7
+ *** Keywords ***
8
+ Add Items To Cart
9
+ [Documentation] Adds ``quantity`` items of ``product`` to the cart and returns the new total.
10
+ [Tags] cart
11
+ [Arguments] ${cart: list} ${product: str} ${quantity: int}=1 ${gift: bool}=${False}
12
+ [Timeout] 10 seconds
13
+ [Setup] Log Adding ${quantity} x ${product}
14
+ FOR ${_} IN RANGE ${quantity}
15
+ Append To List ${cart} ${product}
16
+ END
17
+ IF ${gift} Append To List ${cart} gift wrap
18
+ ${total}= Get Length ${cart}
19
+ RETURN ${total}
20
+ [Teardown] Log Cart has ${total} items
21
+
22
+ Cart Should Contain
23
+ [Documentation] Fails unless ``cart`` holds ``count`` items of ``product``.
24
+ [Arguments] ${cart: list} ${product: str} ${count: int}
25
+ ${found}= Get Match Count ${cart} ${product}
26
+ Should Be Equal ${found} ${count}
@@ -0,0 +1,10 @@
1
+ # RF 7.0+ example: the template keyword of the data-driven examples.
2
+ *** Settings ***
3
+ Documentation Login keywords. A stand-in for a real login: only demo/mode is valid.
4
+
5
+ *** Keywords ***
6
+ Login Should Fail
7
+ [Documentation] Fails if ``username`` and ``password`` are valid credentials.
8
+ [Arguments] ${username} ${password}
9
+ Should Not Be True $username == 'demo' and $password == 'mode'
10
+ ... Login succeeded for '${username}'
@@ -0,0 +1,15 @@
1
+ # RF 7.0+ example: keyword-driven style.
2
+ *** Settings ***
3
+ Documentation One workflow per test: set up, act, verify.
4
+ Resource ../resources/calc.resource
5
+ Test Setup The Calculator Is Cleared
6
+
7
+ *** Test Cases ***
8
+ Adding Two Numbers
9
+ [Tags] smoke
10
+ The User Adds 1 And 2
11
+ The Result Should Be 3
12
+
13
+ Test Without Setup
14
+ [Setup] NONE
15
+ No Operation
@@ -0,0 +1,10 @@
1
+ # RF 7.0+ example: data-driven style, one test per data row.
2
+ *** Settings ***
3
+ Documentation The same workflow with varying data: one template, one row per test.
4
+ Resource ../resources/login.resource
5
+ Test Template Login Should Fail
6
+
7
+ *** Test Cases *** USERNAME PASSWORD
8
+ Invalid User Name invalid mode
9
+ Invalid Password demo invalid
10
+ Empty User Name ${EMPTY} mode
@@ -0,0 +1,17 @@
1
+ # RF 7.0+ example: embedded-argument template and FOR inside a templated test.
2
+ *** Settings ***
3
+ Documentation Many data rows in one test; all rows run even when one fails.
4
+ Resource ../resources/calc.resource
5
+ Resource ../resources/login.resource
6
+
7
+ *** Test Cases ***
8
+ Additions
9
+ [Template] The Result Of ${a} Plus ${b} Should Be ${expected}
10
+ 1 1 2
11
+ 2 3 5
12
+
13
+ Invalid Logins In Loop
14
+ [Template] Login Should Fail
15
+ FOR ${user} IN alice bob
16
+ ${user} wrong
17
+ END
@@ -0,0 +1,10 @@
1
+ # RF 7.0+ example: BDD style. Step keywords are defined without the Given/When/Then prefix.
2
+ *** Settings ***
3
+ Documentation Scenarios that stakeholders read.
4
+ Resource ../resources/calc.resource
5
+
6
+ *** Test Cases ***
7
+ Adding Two Numbers As A Scenario
8
+ Given The Calculator Is Cleared
9
+ When The User Adds 2 And 3
10
+ Then The Result Should Be 5
@@ -0,0 +1,13 @@
1
+ # RF 7.0+ example: embedded arguments that bind multi-word values correctly.
2
+ *** Settings ***
3
+ Documentation "Los Angeles Lakers" binds city=Los Angeles only with quotes or a custom pattern.
4
+ Resource ../resources/embedded.resource
5
+
6
+ *** Test Cases ***
7
+ Quoted Embedded Arguments
8
+ Select Team "Los Angeles" "Lakers"
9
+ Selection Should Be Los Angeles Lakers
10
+
11
+ Embedded Argument With A Custom Pattern
12
+ Pick Team Los Angeles Lakers
13
+ Selection Should Be Los Angeles Lakers
@@ -0,0 +1,6 @@
1
+ # RF 7.0+ example. An init file holds settings only: no *** Keywords ***, no Test Template.
2
+ *** Settings ***
3
+ Documentation Root suite of the rf-language examples.
4
+ Metadata Example rf-language
5
+ Suite Setup Log Running the rf-language examples
6
+ Test Timeout 1 minute
@@ -0,0 +1,7 @@
1
+ # RF 7.0+ example. Every child suite imports api.resource itself; this file defines no keywords.
2
+ *** Settings ***
3
+ Documentation API suite: one session for all API tests.
4
+ Resource ../../resources/api.resource
5
+ Suite Setup Open Api Session
6
+ Suite Teardown Close Api Session
7
+ Test Tags api
@@ -0,0 +1,18 @@
1
+ # RF 7.0+ example: a child suite that imports the resource its parent init file uses.
2
+ *** Settings ***
3
+ Documentation User API tests. Run with: robot --suite users tests
4
+ Resource ../../resources/api.resource
5
+
6
+ *** Test Cases ***
7
+ Create User
8
+ [Tags] smoke
9
+ Api Session Should Be Open
10
+ Create User alice
11
+
12
+ List Users
13
+ Api Session Should Be Open
14
+
15
+ Delete User
16
+ [Tags] smoke slow
17
+ Create User bob
18
+ Delete User bob
@@ -0,0 +1,15 @@
1
+ # RF 7.0+ example: per-environment values from a variable file.
2
+ # robot --variablefile variables/staging.yaml tests/env.robot (YAML needs PyYAML)
3
+ *** Settings ***
4
+ Documentation Values below are the dev defaults; --variablefile overrides them.
5
+ Variables ../variables/common.py
6
+
7
+ *** Variables ***
8
+ ${BASE_URL} http://localhost:8080
9
+ ${ENVIRONMENT} dev
10
+
11
+ *** Test Cases ***
12
+ Environment Values Are Set
13
+ Should Start With ${BASE_URL} http
14
+ Should Not Be Empty ${ENVIRONMENT}
15
+ Should Be Equal As Integers ${RETRIES} 3
@@ -0,0 +1,11 @@
1
+ """RF 7.0+ example: values shared by every environment.
2
+
3
+ Import in a suite with ``Variables ../variables/common.py``. Module-level
4
+ names become variables; ``LIST__`` and ``DICT__`` prefixes create list and
5
+ dictionary variables; names starting with an underscore are skipped.
6
+ """
7
+
8
+ RETRIES = 3
9
+ TIMEOUT = "10 seconds"
10
+ LIST__BROWSERS = ["chromium", "firefox"]
11
+ DICT__ADMIN = {"name": "admin", "role": "owner"}
@@ -0,0 +1,3 @@
1
+ # RF 7.0+ example: robot --variablefile variables/dev.yaml tests (needs PyYAML: uv add pyyaml)
2
+ BASE_URL: http://localhost:8080
3
+ ENVIRONMENT: dev
@@ -0,0 +1,3 @@
1
+ # RF 7.0+ example: robot --variablefile variables/staging.yaml tests (needs PyYAML: uv add pyyaml)
2
+ BASE_URL: https://staging.example.com
3
+ ENVIRONMENT: staging