{"id":28899241,"url":"https://github.com/robotcodedev/rbcn25-mastering-robotcode","last_synced_at":"2025-06-21T08:08:47.358Z","repository":{"id":272902783,"uuid":"918118306","full_name":"robotcodedev/rbcn25-mastering-robotcode","owner":"robotcodedev","description":"How to master RobotCode Extension and Command Line Tools in real-life Robot Framework projects. This workshop covers installation, setup, project structuring, python project managers, `robot.toml` configuration, key features, utilizing CLI tools, integrating CI/CD processes, and collaborating with distributed teams.","archived":false,"fork":false,"pushed_at":"2025-02-18T08:47:42.000Z","size":295,"stargazers_count":5,"open_issues_count":0,"forks_count":12,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-04T02:31:35.003Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"RobotFramework","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robotcodedev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-17T09:35:05.000Z","updated_at":"2025-03-11T08:28:02.000Z","dependencies_parsed_at":"2025-02-28T00:37:24.453Z","dependency_job_id":"4c1eee88-4611-4fe4-bdbd-e47f063cbe10","html_url":"https://github.com/robotcodedev/rbcn25-mastering-robotcode","commit_stats":null,"previous_names":["febb0e/rbcn25-mastering-robotcode","robotcodedev/rbcn25-mastering-robotcode"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robotcodedev%2Frbcn25-mastering-robotcode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robotcodedev%2Frbcn25-mastering-robotcode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robotcodedev%2Frbcn25-mastering-robotcode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robotcodedev%2Frbcn25-mastering-robotcode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robotcodedev","download_url":"https://codeload.github.com/robotcodedev/rbcn25-mastering-robotcode/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robotcodedev%2Frbcn25-mastering-robotcode/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":258660189,"owners_count":22737357,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-21T08:08:46.715Z","updated_at":"2025-06-21T08:08:47.345Z","avatar_url":"https://github.com/robotcodedev.png","language":"RobotFramework","readme":"# Mastering RobotCode and robot.toml: Best Practices in Real-Life Robot Framework Projects\n\n[![Pipeline Status](https://github.com/robotcodedev/rbcn25-mastering-robotcode/actions/workflows/run_tests.yml/badge.svg)](https://github.com/robotcodedev/rbcn25-mastering-robotcode/actions/workflows/run_tests.yml)\n[![Robotframework Report](https://img.shields.io/badge/Robotframework%20Report-00C0B5)](https://robotcodedev.github.io/rbcn25-mastering-robotcode/public/reports/report.html)\n[![Robotframework Log](https://img.shields.io/badge/Robotframework%20Log-00C0B5)](https://robotcodedev.github.io/rbcn25-mastering-robotcode/public/reports/log.html)\n\nHow to master **RobotCode Extension** and Command Line Tools in real-life Robot Framework projects.\n\n![Robotcode Logo](robotcode-logo.svg)\n\nThis workshop covers installation, setup, project structuring, python project managers, `robot.toml` configuration, key features, utilizing CLI tools, integrating CI/CD processes, and collaborating with distributed teams.\n\n## Workshop Overview\n\nThis workshop offers an in-depth introduction to the RobotCode Extension and Command Line Tools, focusing on their practical application in real-life Robot Framework projects.\n\nParticipants will gain hands-on experience and learn best practices to enhance their test automation workflows.\n\n## Key Topics\n\n1. **Installation of RobotCode:**\n   - Step-by-step guide to installing the RobotCode Extension and CLI tools.\n   - Install the VSCode extension and create your python `.venv`.\n\n2. **Project Setup with RobotCode:**\n   - Creating a new example project.\n     - Create virtual python environments to separate system interpreter and development venv.\n       - This helps with different projects regarding different dependencies.\n       - Separation of projects.\n     - Creating a `requirements.txt` with all project dependencies.\n       - Put the project's dependencies into it.\n     - `robotframework-tidy` helps with linting your project.\n     - `Developer: Reload Window` after installing `.venv` for RobotCode to get the new environment.\n     - `Log` vs. `Log To Console`\n       - Log is preferred as you have everything in one place (Debug Console).\n   - Configuring the project environment and RobotCode settings.\n     - Debug Settings:\n       - `Debug: Group Output` helps with more debug information\n         - `\"robotcode.debug.groupOutput\": true,`\n       - `Debug: Output Timestamps` shows you the execution timestamps\n         - `\"robotcode.debug.outputTimestamps\": true`\n       - Put the Debug Settings in the `.vscode/settings.json` for local settings.\n         - Comment in the settings for overwriting them quickly.\n       - `\"robotcode.run.openOutputAfterRun\": \"log\"` if you want to auto open the log/report after each run.\n       - Debug Python Code:\n         - `\"robotcode.debug.attachPython\": true`\n   - Devcontainer:\n     - Helps with creating a standardized environment with fixed versions for testers/developers to have the same environment.\n     - Make ports public if you want to display `log.html` and it does not work out of the box.\n   - Debugging Tips:\n     - Use Variable Scopes.\n     - Change Variable Values in the debug menu by overwriting them.\n     - In the Debug Console, you can use Robot Framework Keywords from Commandline.\n     - In Debug watches, you can add expressions.\n     - `#exprmode` enables/disables python expression mode (toggle).\n     - Use the breakpoint toggles to enable different breakpoint modes.\n   - Features:\n     - Find Library Keywords by typing `LibraryName` + `.` and scroll the keywords.\n     - Variables are sorted by the distance in autocompletion.\n       - Local scope is closest, then Suite scope, then global scope.\n     - Explorer View:\n       - Select `Keywords` Dropdown.\n       - View Keyword-Documentation.\n       - Insert Keywords or Drag \u0026 Drop them.\n       - Search within Library-Keywords (F3).\n     - Debug Logs:\n       - RobotCode Log: Logging of RobotCode Details.\n       - RobotCode Language Server Log: Logging of Language Server Details.\n         - Helps with your own debugging or reporting issues with detailed information.\n   - Structuring the project for scalability and maintainability.\n     - Simple Projects:\n       - Create a `/resources` directory with `*.resource` files for Robot Framework Keywords.\n         - This will add `/resources` to the PYTHON_PATH.\n       - Create a `/lib` directory with `*.py` files for python keywords.\n         - This will add `/lib` to the PYTHON_PATH.\n       - This way you can add `.resource` and `.py` keyword files **without** using the absolute file path.\n       - When using different folder names/structures for your project, you need to add the folder paths to your PYTHON_PATH for usage without the full directory path.\n       - TIP: Use `settings.json` for your personal local changes and do not commit to your Git-Repo!\n         - These settings are for your personal preference.\n       - Enable/Disable \"RobotCode Play Buttons\" -\u003e Settings-RobotCode-Test Explorer-Enable/Disable.\n   - Using Python project managers for efficient dependency management.\n     - Project managers help you with:\n       - Managing dependencies.\n       - Managing execution and development environments.\n       - Creating virtual environments.\n       - EXAMPLE: [hatch](https://hatch.pypa.io/latest/)\n         - Follows the PEP standard.\n         - Gives you the opportunity to create test matrices to e.g. run multiple virtual environments in parallel.\n   - Best practices in project setup and organization.\n     - Use a python package manager to organize your project and set it up in a standardized way.\n     - Integrate [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) for versioning your project and automatically create a `Changelog.md`.\n\n3. **Exploring RobotCode Features:**\n   - Overview of general features that enhance productivity.\n     - RobotFramework Notebook:\n       - File -\u003e New File -\u003e RobotFramework Notebook.\n       - First Version included in VSCode supporting `*.robot` Files and Markdown.\n       - Uses the REPL, so there are no `*** Settings ***` or `*** Variables ***` sections.\n       - Helping with Business Analyst Files such as RPA procedures.\n     - Robotcode REPL (Read-Evaluate-Print-Loop):\n       - Install (if not yet): `pip install robotcode-repl`.\n       - In CLI: use `robotcode repl`.\n       - Type Keywords and Expressions that are directly evaluated.\n   - Introduction to new and advanced features.\n\n4. **Using `robot.toml` Configuration:**\n   - Understanding general configuration settings.\n     - `robot.toml` supports all possible configurations from [toml.io](https://toml.io/en/).\n     - Helps with interaction towards Robot Framework through its CLI API.\n     - **Every** CLI argument from Robot Framework has a configuration analog in `robot.toml`.\n     - There are different ways of defining values in the toml file.\n   - Creating configuration profiles for different environments.\n     - `robotcode config files` shows you all the `robot.toml` configuration files.\n     - `robot.toml` files exist for the user space and project space.\n       - Settings in the project space overwrite user space and local space overwrites project space.\n     - All configurations for Python = `pyproject.toml`.\n     - All configurations for Robot Framework = `robot.toml`.\n     - Local Configuration for overwriting `robot.toml` = `.robot.toml`.\n       - This file is not meant to be pushed to Git.\n     - Hierarchy of the files:\n       - Default user space.\n       - Project space.\n       - Local space.\n     - `robotcode config root` gives you the root directory, which is dependent on the position of the `robot.toml` file.\n     - `robotcode config info` gives you information on the config files.\n     - `robotcode profiles show` shows you the configuration with your selected profiles.\n     - Run Robot Framework files with specific profiles: `robotcode -p profile_a -p profile_b robot`.\n     - `[variables]` at the root level of the `robot.toml` file are used by all profiles.\n       - EXCEPT: using profiles with `[profiles.profile_a.variables]`.\n         - All variables in here are specific to the profile and ignore the root-level `[variables]`.\n       - When using `[profiles.profile_a.extend-variables]` the root-level variables are extended, meaning:\n         - Root-level existing variables are replaced, if specified again.\n         - Root-level existing variables are taken into the profile, if not again specified.\n         - Profile-specific variables are included as well.\n   - `robotcode debug`.\n   - `robotcode analyze` is a static code analyzer for your project.\n     - Analyzer Errors, Warnings, and Hints can be ignored by commenting `# robotcode: ignore[KeywordNotFound]`.\n       - This ignoring is indentation dependent!!\n     - Resetting the settings can be done by `robotcode: reset[KeywordNotFound]`.\n     - Configure within `robot.toml`:\n\n       ```toml\n       [tool.robotcode-analyze.modifiers]\n       ignore=[KeywordNotFound]\n       ```\n\n   - Splitting configuration into multiple files for modularity.\n\n5. **Command Line Interface (CLI) Tools:**\n   - Retrieving valuable information about your project.\n     - `robotcode` will give you all commands with descriptions.\n     - `robotcode discover` will give information about Suites, Test Cases.\n       - `robotcode discover all .` to look for whole project information.\n       - Filter test cases with robot options.\n         - e.g `include/exclude` tags etc.\n       - `--format` Option for printing results in a wanted format e.g. json for reuse in different projects.\n       - Excludes all files that are ignored within [.gitignore](http://_vscodecontentref_/0).\n       - Alternative: create `.robotignore` for excluding it from `robotcode discover` and speed up the discovery process or exclude local files for personal usage.\n   - Analyzing your project to identify improvements.\n     - `robotcode analyze`.\n   - Running tests directly from the command line.\n   - Implementing git hooks to streamline your development workflow.\n   - Best practices for effective CLI usage.\n\n6. **Integrating CI/CD Processes:**\n   - Executing tests within a CI/CD pipeline.\n     - Use `robot.toml` profiles to run CI settings on a local machine.\n     - Ensure the CI process is low in complexity and mimics the steps done on the local machine as closely as possible.\n   - Debugging test runs in CI/CD environments.\n   - Best practices for continuous integration and deployment.\n     - Keep the CI pipeline simple and maintainable.\n     - Use the same `robot.toml` profiles for both local and CI environments to ensure consistency.\n     - Automate as much as possible to reduce manual intervention and errors.\n\n7. **Collaborating with Distributed Teams:**\n   - Structuring and packaging Robot Framework projects for team collaboration.\n   - Sharing and utilizing resources and libraries across multiple teams and projects.\n   - Best practices for working in distributed development environments.\n     - Step-by-step guide on building your resource files from `src/demo` via Hatch to create a `.wheel` file:\n       1. Ensure you have Hatch installed:\n\n          ```sh\n          pip install hatch\n          ```\n\n       2. Navigate to your project directory:\n\n          ```sh\n          cd /path/to/your/project\n          ```\n\n       3. Create a `pyproject.toml` file in the root of your project with the following content:\n\n          ```toml\n          [build-system]\n          requires = [\"hatchling\"]\n          build-backend = \"hatchling.build\"\n\n          [project]\n          name = \"your_project_name\"\n          version = \"0.1.0\"\n          description = \"Your project description\"\n          readme = \"README.md\"\n          requires-python = \"\u003e=3.7\"\n          license = {text = \"MIT\"}\n\n          [tool.hatch.build.targets.wheel]\n          packages = [\"src/demo\"]\n          ```\n\n       4. Build the `.wheel` file:\n\n          ```sh\n          hatch build\n          ```\n\n       5. The `.wheel` file will be created in the `dist` directory. This file can then be uploaded to any package registry or distributed to other teams in different ways.\n     - Integrate this process into the CI pipeline, e.g., with every new release:\n       - Add the following steps to your CI configuration:\n\n         ```yaml\n         jobs:\n           build:\n             runs-on: ubuntu-latest\n             steps:\n               - uses: actions/checkout@v2\n               - name: Set up Python\n                 uses: actions/setup-python@v2\n                 with:\n                   python-version: '3.x'\n               - name: Install Hatch\n                 run: pip install hatch\n               - name: Build wheel\n                 run: hatch build\n               - name: Upload wheel to registry\n                 run: |\n                   twine upload dist/*.whl\n         ```\n\n     - Commands for participants to try the distribution with Hatch themselves:\n\n       1. Navigate to your project directory:\n\n          ```sh\n          cd /path/to/your/project\n          ```\n\n       2. Create a `pyproject.toml` file as described above.\n       3. Build the `.wheel` file:\n\n          ```sh\n          hatch build\n          ```\n\n       4. Distribute the `.wheel` file as needed.\n\n## Who Should Attend\n\n- Developers, QA engineers, and test automation professionals using Robot Framework.\n- Individuals seeking to enhance their skills with RobotCode.\n- Teams interested in improving collaboration and efficiency in test automation.\n\n## Methodology\n\nThe workshop combines lectures, live demonstrations, and hands-on exercises.\n\n## Prerequisites\n\n- Basic understanding of Robot Framework.\n- Familiarity with Python is beneficial but not mandatory.\n- A Notebook with internet connection and Visual Studio Code (or PyCharm) installed.\n\n## Lessons Learned\n\n- Install and configure RobotCode and its CLI tools.\n- Set up and structure Robot Framework projects effectively.\n- Manage projects and dependencies using Python project managers.\n- Leverage RobotCode features to optimize workflows.\n- Integrate RobotCode tools into CI/CD pipelines.\n- Collaborate efficiently within distributed teams.\n- Apply best practices throughout test automation projects.\n\n## Authors\n\n- [Daniel Biehl](https://github.com/d-biehl)\n- [Fabian Tsirogiannis](https://github.com/febb0e)\n\n## Links\n\n- [RobotCode](https://github.com/robotcodedev/robotcode)\n- [Hatch](https://hatch.pypa.io/latest/)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobotcodedev%2Frbcn25-mastering-robotcode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobotcodedev%2Frbcn25-mastering-robotcode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobotcodedev%2Frbcn25-mastering-robotcode/lists"}