diff --git a/code-examples/core/bdd-syntax/config.json b/code-examples/core/bdd-syntax/config.json index 3191beed..a3b66166 100644 --- a/code-examples/core/bdd-syntax/config.json +++ b/code-examples/core/bdd-syntax/config.json @@ -17,4 +17,4 @@ { "fileName": "BDD.robot" } ] -} \ No newline at end of file +} diff --git a/website/docs/about/contribute.md b/website/docs/about/contribute.md index f020537c..fba11be4 100644 --- a/website/docs/about/contribute.md +++ b/website/docs/about/contribute.md @@ -4,6 +4,8 @@ sidebar_label: How to contribute title: How to contribute --- +## Quickstart + This documentation project is powered by [Docusaurus](https://docusaurus.io/) and maintained on [GitHub](https://github.com/MarketSquare/robotframeworkguides) The basic steps to contribute to the project are: @@ -19,18 +21,18 @@ The basic steps to contribute to the project are: - Build and Deployment will be handled by GitHub Actions -# GitHub Repository +## GitHub Repository -## Branches +### Branches There are two branches in the project: - `main` is the default branch and is used to maintain the documentation - `gh-pages` is only used for the deployment of the `.html` documentation to GitHub Pages -## Folders +### Folders -### Docs +#### Docs Docs are written in Markdown and are stored [here](https://github.com/MarketSquare/robotframeworkguides/tree/main/website/docs) @@ -54,14 +56,14 @@ You can use a `_category_.json` file to customize the sidebar label and the posi } ``` -## Static Files (e.g. images) +### Static Files (e.g. images) Static files (like images) are stored in the `website/static` folder [here](https://github.com/MarketSquare/robotframeworkguides/tree/main/website/static) They will be automatically included in the built and will be accessible via the `/` path (e.g. images are accessible via `/img/robotframeworkguides_logo.png`) -# Updating Documentation +## Updating Documentation -## Run the development server +### Run the development server - Go to directory containing the `package.json` file - Download dependencies via `npm install` @@ -73,7 +75,7 @@ Changes are visible in real time in the browser. ![Development Server](/img/contribute/dev_server.png) -## Create Build and Push +### Create Build and Push - Run the build via `npm run build` - Test the build locally with `npm run serve` diff --git a/website/docs/different_libraries/database.md b/website/docs/different_libraries/database.md index 952ab789..8b042f1c 100644 --- a/website/docs/different_libraries/database.md +++ b/website/docs/different_libraries/database.md @@ -29,7 +29,7 @@ Examples are: ## Examples -Check out the [tests](https://github.com/franz-see/Robotframework-Database-Library/tree/master/test) folder in the repository for examples. +Check out the [tests](https://github.com/MarketSquare/Robotframework-Database-Library/tree/master/test) folder in the repository for examples. Example for a PostgreSQL database: diff --git a/website/docs/different_libraries/libraries.table.js b/website/docs/different_libraries/libraries.table.js index 0071aa94..4ec18b94 100644 --- a/website/docs/different_libraries/libraries.table.js +++ b/website/docs/different_libraries/libraries.table.js @@ -42,7 +42,7 @@ export const libraries = [ title: "Database Library", description: "Python based library for database testing.", isData: "✅", - url: "https://github.com/franz-see/Robotframework-Database-Library", + url: "https://github.com/MarketSquare/Robotframework-Database-Library", }, ]; diff --git a/website/docs/extending_robot_framework/custom-libraries/python_library.md b/website/docs/extending_robot_framework/custom-libraries/python_library.md index 3e16e8a3..7644a228 100644 --- a/website/docs/extending_robot_framework/custom-libraries/python_library.md +++ b/website/docs/extending_robot_framework/custom-libraries/python_library.md @@ -34,7 +34,7 @@ Use a Keyword with multiple arguments -### Static Library withouth a Class +### Static Library without a Class ```python import base64 diff --git a/website/docs/extending_robot_framework/listeners_prerun_api/prerunmodifier.md b/website/docs/extending_robot_framework/listeners_prerun_api/prerunmodifier.md index f894a070..6e291980 100644 --- a/website/docs/extending_robot_framework/listeners_prerun_api/prerunmodifier.md +++ b/website/docs/extending_robot_framework/listeners_prerun_api/prerunmodifier.md @@ -152,7 +152,7 @@ class CopyTest(SuiteVisitor): """Copy and modify tests in the test suite.""" for test in suite.tests: if "copy" not in test.tags: - test_case = suite.tests.append(test.copy()) + test_case = suite.tests.append(test.deepcopy()) test_case.tags.add("copy") test_case.name = f"{test_case.name} (copy)" ``` diff --git a/website/docs/getting_started/ide.mdx b/website/docs/getting_started/ide.mdx index 4ef934c2..084a668c 100644 --- a/website/docs/getting_started/ide.mdx +++ b/website/docs/getting_started/ide.mdx @@ -40,8 +40,9 @@ It provides extensions for a lot of different languages and technologies. ![VS Code](/img/vscode_site.png) Popular extensions for Robot Framework: -- [Robot Code](https://marketplace.visualstudio.com/items?itemName=d-biehl.robotcode) +- [Robot Code](https://robotcode.io) - [Robot Framework Language Server](https://marketplace.visualstudio.com/items?itemName=robocorp.robotframework-lsp) + - ⚠️ No longer maintained and does not work with Robot Framework 7+ #### Install Visual Studio Code @@ -88,14 +89,15 @@ e.g. `sudo rpm -i ~/Downloads/code-1.65.2-1646927812.el7.x86_64.rpm` #### Visual Studio Code Extensions -:::caution +:::tip Only install one Robot Framework Extension Make sure that only a **single** Robot Framework extension is installed. +We strongly recommend to only install [RobotCode](https://robotcode.io) ::: -[RobotCode](https://marketplace.visualstudio.com/items?itemName=d-biehl.robotcode) is a Visual Studio Code extension for Robot Framework. +[RobotCode](https://robotcode.io) is a Visual Studio Code extension for Robot Framework. ![RobotCode](/img/robotcode.png) @@ -104,11 +106,16 @@ Make sure that only a **single** Robot Framework extension is installed. 3. Search for `RobotCode` and click on it 4. Click on `Install` +Check out this extended Tutorial about Robot Code + + [Robot Framework Language Server](https://marketplace.visualstudio.com/items?itemName=robocorp.robotframework-lsp) is a Visual Studio Code extension for Robot Framework. +⚠️ No longer maintained and does not work with Robot Framework 7+ + ![Robot Framework Language Server](/img/rflsp.png) 1. Open Visual Studio Code @@ -126,6 +133,7 @@ Make sure that only a **single** Robot Framework extension is installed. Popular extensions for Robot Framework: - [Robot Framework Language Server](https://plugins.jetbrains.com/plugin/16086-robot-framework-language-server) +- [Hyper RobotFramework Support](https://plugins.jetbrains.com/plugin/16382-hyper-robotframework-support) @@ -141,7 +149,9 @@ Make sure to install the free `PyCharm Community Edition` and not the `PyCharm P #### PyCharm extensions -Make sure that only one single Robot Framework extension is installed. +:::tip Only install one Robot Framework Extension +Make sure that only a **single** Robot Framework extension is installed. +::: ##### Robot Framework Language Server @@ -154,6 +164,32 @@ Make sure that only one single Robot Framework extension is installed. 6. Add a Debug Configuration for Robot Framework to run current test case (via selected text) ![Debug Config Current Test Case](/img/getting_started/pycharm_conf_selected_test.png) + + + +⚠️ No longer maintained and does not work with Robot Framework 7+ + +1. Press `Ctrl + Alt + S` to open the settings dialog +2. Select `Plugins` +3. Select the `Marketplace` tab +4. Search for `Robot Framework Language Server` and click on `Install` +5. Add a Debug Configuration for Robot Framework to run current test suite +![Debug Config Current Test Suite](/img/getting_started/pycharm_conf_current_suite.png) +6. Add a Debug Configuration for Robot Framework to run current test case (via selected text) +![Debug Config Current Test Case](/img/getting_started/pycharm_conf_selected_test.png) + + + + + +1. Press `Ctrl + Alt + S` to open the settings dialog +2. Select `Plugins` +3. Select the `Marketplace` tab +4. Search for `Hyper RobotFramework Support` and click on `Install` + + + + ## Run and Debug Robot Framework Tests @@ -176,8 +212,7 @@ Test Execution will begin and stop at the breakpoint. Use `Debug Toolbar` to select actions like step over, step into, step out, continue, pause, etc. ![Debug Toolbar](/img/VSC_DebugToolbar.png) -Run Robot Frameworm commands while debugging from `Debug Console`. -Commands needs to start with `! ` +Run Robot Framework commands while debugging from `Debug Console`. ![Debug Console](/img/VSC_RBTCD_executeDebugCommands.png) ### PyCharm with Robot Framework Language Server diff --git a/website/docs/getting_started/rpa.md b/website/docs/getting_started/rpa.md index c1ea9c37..9c184656 100644 --- a/website/docs/getting_started/rpa.md +++ b/website/docs/getting_started/rpa.md @@ -7,115 +7,6 @@ description: Use rcc to create a new RPA project import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -:rocket: **Welcome!**
-You can find more explanations and guidance down below, but first, let's get you running a bot :runner: - -## Run your first robot -The scripts below enable you to get a robot setup and running from a selection of templates using a CLI tool called [RCC](https://github.com/robocorp/rcc#readme) - - - - -``` -curl -o rcc.exe https://downloads.robocorp.com/rcc/releases/latest/windows64/rcc.exe -rcc create example -cd example -..\rcc run -``` - - - -``` -brew install robocorp/tools/rcc -rcc create example -cd example -../rcc run -``` - - - -``` -curl -o rcc https://downloads.robocorp.com/rcc/releases/latest/linux64/rcc -chmod a+x rcc -rcc create example -cd example -../rcc run -``` - - - -The first run sets up the environment, so it takes a bit longer, but if you do the `rcc run` a second time, you'll see the power of RCC. - -:rocket: With your bot running, you can now look deeper into what you just did and then jump on to editors to get cracking. - -## What is this RCC? - -[RCC](https://github.com/robocorp/rcc#readme) is an open-source tool that handles everything essential around an RPA robot run on Windows, macOS, and Linux. With RCC, the machine running the robot does not even need Python installed. - -So, if you look back into [the first robot you ran](/docs/getting_started/rpa#run-your-first-robot), you will see the following: -1. The environment your bot needs is defined in: [conda.yaml](https://github.com/robocorp/rcc/blob/master/docs/recipes.md#what-is-in-condayaml) -1. How your robot is executed is defined in: [robot.yaml](https://github.com/robocorp/rcc/blob/master/docs/recipes.md#what-is-in-robotyaml) -1. The logic of your bot is in Robot Framework (`.robot`) or Python (`.py`) -files... or both. - -With the above files [RCC](https://github.com/robocorp/rcc#readme) can set up an isolated environment and ensure your bot runs the same way every time.
-:point_right: Get rid of: "Works on my machine". - -> RCC has a lot of cool tricks, so once you've gotten started, it is worth [check out some more](https://github.com/robocorp/rcc/tree/master/docs#readme) - -:rocket: So now you have your bot running and have a slight idea how you got there; what next?
-You need to see and edit your bot code to get it doing what you need, so head-on to the [Editor and IDEs](/docs/getting_started/rpa#editors-and-ides) - -## Editors and IDEs -There is no shortage of editors for Robot Framework and Python, but for RPA work, we limit the list to get you started. In the end, what you create is just Robot Framework and Python code, so you are not limited to the tools mentioned here. - -### Automation Studio -If you are unfamiliar with coding and tools like VS Code, we'd recommend starting with a tool like [Automation Studio](https://robocorp.com/automation-studio). - -![](studio.gif) - -This kind of IDE enables you to start without worrying about syntax, environments, etc., right from the bat. You can still get quite far, and the tool allows you to see and edit on the code level. Automation Studio is also creating a robot just like the first RCC bot, so you can jump to other tools if you feel limited. - -> For the test automation people:
-Note that there is very little RPA specific about Automation Studio as it is just generating Robot Framework code.
-Even hard-boiled coders like to do things easy once in a while :wink: - -### Visual Studio Code - -If you are using [VS Code](https://code.visualstudio.com) or are looking for the complete feature set of developer tools, then the extensions are for you. - -:point_right: [Get VS Code here](https://code.visualstudio.com) - -To get going with RPA development, you need two extensions: The extension for LSP and the RCC extension. - -### RCC extension for VS Code -This extension brings in the RCC functionality with command palette commands and a nice sidebar. - -:point_right: [Get Robocorp Code here](https://marketplace.visualstudio.com/items?itemName=robocorp.robocorp-code) - -![](vscode-code.gif) - -### Robot Framework LSP extensions for VS Code -Language Server Protocol extensions bring in code completion, documentation, highlighting, etc., for your Robot Framework code. -There are options here, but **remember only to install one** as multiple LSP handlers will cause problems: - - - - - -:point_right: [Get Robot Framework LSP here](https://marketplace.visualstudio.com/items?itemName=robocorp.robotframework-lsp) - -![](vscode-lsp.gif) - - - - -:point_right: [Get Robot Code here](https://marketplace.visualstudio.com/items?itemName=d-biehl.robotcode) - -![](vscode-robotcode.gif) - - - - ## About Robotic Process Automation (RPA) Robotic Process Automation (RPA) is similar to test automation on the technical level, but the mentality is different on the business and results side. In RPA, it is pretty standard that you are not running on a machine you control entirely, so your robot needs to be "self-sufficient" and isolated. Also, instead of finding and documenting places where robot execution fails or succeeds, the aim is always to succeed and get the result of the process. @@ -136,8 +27,6 @@ You are raring to go, so go ahead and check out the resources and libraries -par For the resources and libraries part you can check out the following pages: * [RPA libraries](/docs/different_libraries/rpa) * [How to find the right library](/docs/different_libraries/how_to_find_library) -* Sources for RPA example in Robot Framework: - * [Robocorp Portal](https://robocorp.com/portal/) The main point to remember is that with Robot Framework and Python, there are just about no limits to what you can do. There are a ton of libraries out there, but you can also make your own. @@ -149,5 +38,27 @@ It is quite rare that the business value of an RPA process is in the library tha * [Help out with this documentation](/docs/about/contribute) * Create example bots into the public repository and ping in the forums and Slacks +## Editors and IDEs +There is no shortage of editors for Robot Framework and Python, but for RPA work, we limit the list to get you started. In the end, what you create is just Robot Framework and Python code, so you are not limited to the tools mentioned here. +### Visual Studio Code + +If you are using [VS Code](https://code.visualstudio.com) or are looking for the complete feature set of developer tools, then the extensions are for you. + +:point_right: [Get VS Code here](https://code.visualstudio.com) + +To get going with RPA development, you need an extension that's call a language server protocl. Essentially it is a plug-in or extension that provides helpers within the IDE environment that assist you in writing your RPA scripts. + +### Robot Framework LSP extensions for VS Code +Language Server Protocol extensions bring in code completion, documentation, highlighting, etc., for your Robot Framework code. +There are a few options here but we recommend Robot Code. It is important to **remember only to install one** as multiple extensions will cause problems: + + + + +:point_right: [Get Robot Code here](https://marketplace.visualstudio.com/items?itemName=d-biehl.robotcode) + +![](vscode-robotcode.gif) + + \ No newline at end of file diff --git a/website/docs/parsing_results.md b/website/docs/parsing_results.md index 4928aa96..ff81c329 100644 --- a/website/docs/parsing_results.md +++ b/website/docs/parsing_results.md @@ -71,8 +71,8 @@ Simple example to read number of passed and failed tests from robot.api import ExecutionResult result = ExecutionResult('output.xml') stats = result.statistics -print(f"Number of Failed Tests: {stats.failed}") -print(f"Total number of Tests: {stats.passed}") +print(f"Number of Failed Tests: {stats.total.failed}") +print(f"Total number of Tests: {stats.total.passed}") ``` You can also create a table in a markdown file `report.md`with the results. @@ -128,4 +128,4 @@ That's how the result will look like: |A Failed Test Case|FAIL| ### More information -Check the [documentation](https://robot-framework.readthedocs.io/en/stable/autodoc/robot.result.html?highlight=Resultvisitor%20#module-robot.result.visitor) \ No newline at end of file +Check the [documentation](https://robot-framework.readthedocs.io/en/stable/autodoc/robot.result.html?highlight=Resultvisitor%20#module-robot.result.visitor) diff --git a/website/docs/reporting_alternatives.md b/website/docs/reporting_alternatives.md index 12ad1f11..76b5df6c 100644 --- a/website/docs/reporting_alternatives.md +++ b/website/docs/reporting_alternatives.md @@ -15,9 +15,9 @@ It is integrated with Robot Framework via a listener [robotframework-reportporta ### Allure -[Allure Framework](https://docs.qameta.io/allure-report/) is a flexible lightweight multi-language test report tool that not only shows a very concise representation of what have been tested in a neat web report form, but allows everyone participating in the development process to extract maximum of useful information from everyday execution of tests. +[Allure Report](https://allurereport.org/) is a flexible lightweight multi-language test report tool that not only shows a very concise representation of what have been tested in a neat web report form, but allows everyone participating in the development process to extract maximum of useful information from everyday execution of tests. -It is integrated with Robot Framework via a listener [robotframework-allure](https://github.com/allure-framework/allure-python) +It is integrated with Robot Framework via a listener [robotframework-allure](https://github.com/allure-framework/allure-python). A detailed integration guide is available on the official website: https://allurereport.org/docs/robotframework/ ### Grafana Grafana can be used to visualize test results in a dashboard. diff --git a/website/docs/style_guide.md b/website/docs/style_guide.md index 6db1cc7f..bdcdd3c1 100644 --- a/website/docs/style_guide.md +++ b/website/docs/style_guide.md @@ -4,7 +4,7 @@ sidebar_position: 5 # Style Guide -Version 0.9b +Version 0.10b ## Introduction @@ -1148,7 +1148,7 @@ ${LONG ITEM} some very long name of the ... grape ... avocado ... kiwi -... $(LONG ITEM) +... ${LONG ITEM} ``` ###### Dictionaries @@ -1698,7 +1698,6 @@ Commandline Variables and by extension variable files should be treated as Globa #### Environment Variables -https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#environment-variables https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#environment-variables Environment Variables should be treated as Global Variables. (i.e. Always UPPER CASED, UPPER_CASED) @@ -1809,3 +1808,202 @@ Attribute Variables Set Suite Variable ${SUITE VARIABLE.name} this is a suite variable ${SUITE VARIABLE.bar} Set Variable this is a suite attribute ``` + +## Test Templates + +User Guide Reference: +[Test Templates](https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#test-templates) + +General rules + +- Any two column should be separated by 4 spaces from each other. +- Each column should be left-aligned. +- Data columns should have titles. +- The titles should be capitalised. +- The titles should be left-aligned with respect to the data columns. + +The Template Keyword follows the same common rules as any other Keyword. + +--- + +### Test Cases Or Tasks + +Templated test cases and tasks share the same guidelines. Below are examples for the +different cases, depending on how templates are used. + + + + +```robot +*** Settings *** +Documentation Templated test case. +Test Template Template Keyword + + +*** Test Cases *** COLUMN1 COLUMN2 COLUMN3 +Test Case 00000 aaaaa AAAAAAAAAA + 1111111111 bbb BBBBBBBBBBBBBB + ${EMPTY} aaaa AAAAAAA + ${EMPTY} bbbbbbb BBB + ${NONE} a AAAAAAAAAA + ${NONE} bbb BBBBBBBBBBBBBB + + +*** Keywords *** +Template Keyword + [Arguments] ${arg1} ${arg2} ${arg3} + Log Many ${arg1} ${arg2} ${arg3} +``` + + + + +```robot +*** Settings *** +Documentation Two templated tasks. +Task Template Template Keyword + + +*** Tasks *** COLUMN1 COLUMN2 COLUMN3 +First Task 00000 aaaaa AAAAAAAAAA + 1111111111 bbb BBBBBBBBBBBBBB + ${EMPTY} aaaa AAAAAAA + ${EMPTY} bbbbbbb BBB + ${NONE} a AAAAAAAAAA + ${NONE} bbb BBBBBBBBBBBBBB + +Another Task With Longer Name 00000 a AAAAAAAAAA + 1111111111 bbbbbbbbbbb BBBBBBBBBBBBBB + ${EMPTY} aa AAAAAAA + ${EMPTY} bbbb BBB + ${NONE} aaaaaaaaaa AAAAAAAAAA + ${NONE} bb BBBBBBBBBBBBBB + + +*** Keywords *** +Template Keyword + [Arguments] ${arg1} ${arg2} ${arg3} + Log Many ${arg1} ${arg2} ${arg3} +``` + + + + +```robot +*** Settings *** +Documentation Individually named test cases. +... Tests sorted according to ARG values. +Test Template Template Keyword + + +*** Test Cases *** ARG SECOND ARG ANOTHER ARG +Test abc123 aaaa AAAAAAAAAA +Another Test 1111111111 bbb BBBBBBBBBBBBBB +One More Test With Long Name 222 cc CCCCCCCCCCCCCCC + +Test With Empty ${EMPTY} aaaa AAAAAAAAAA +Another Test With Empty ${EMPTY} bbb BBBBBBBBBBBBBB +One More Test With Empty ${EMPTY} cc CCCCCCCCCCCCCCC + +Test With None ${NONE} aaaa AAAAAAAAAA +Another Test With None ${NONE} bbb BBBBBBBBBBBBBB +One More Test With None ${NONE} cc CCCCCCCCCCCCCCC + + +*** Keywords *** +Template Keyword + [Arguments] ${arg1} ${arg2} ${arg3} + Log Many ${arg1} ${arg2} ${arg3} +``` + + + + +```robot +*** Settings *** +Documentation Eeach test case using different template. + + +*** Test Cases *** +Test Case With Template A + [Template] Template A + aa 123 + a Hello Word! + aaaaaa ${5} + aaa ${NONE} + +Test Case With Template B + [Template] Template B + bbbbbbbbbbbbb 456 ${1.5} + bbbbbbbb ${EMPTY} anything + bbb something 7899999999999 + bbbbbbbbbbb ${2} ${EMPTY} + + +*** Keywords *** +Template A + [Documentation] This is first template. + [Tags] A + [Arguments] ${arg1} ${arg2} + Log Many ${arg1} ${arg2} + +Template B + [Documentation] This is second template. + [Tags] B + [Arguments] ${arg_one} ${arg_two} ${arg_three} + Log Many ${arg_one} ${arg_two} ${arg_three} +``` + + + + +In **Example 1**, section name `*** Test Cases ***` and `COLUMN1` are separated by 4 spaces, as well as following +columns. The distance is measured between the longest item in the given column and the start of the following column. +For example, the longest item in the first column is `1111111111`, therefore, corresponding item in the next +column, `bbb` is separated by 4 spaces from it. + +In **Example 2**, there are two tasks in one file, and the +data in all tasks are aligned with respect to each other. In each task, for easier navigation, data rows with constant +values are listed first, next with `${EMPTY}` and `${NONE}`. + +If the number of iterations, or the number of test cases/tasks grow, it is a good idea to sort rows in certain logical +order if applicable. This will ease finding the relevant raws when adding or removing data. Empty lines can be used to +separate tests into logical groups as in **Example 3**. When dealing with large data, consider using +[DataDriver library](https://docs.robotframework.org/docs/testcase_styles/datadriven#using-datadriver-library). + +In **Example 4**, there are different templates set for different test cases. The data is aligned within *each* test +case. This is because they are using different templates and therefore, are independent. Note that the columns are not +titled - this is an exception in the per-test case templates because title placement on the same line as test names, and +`[Template]` setting between the columns titles and the data, would make the tests unreadable. + +### Note On Documentation And Tags + +In special cases, there might be a need to specify Documentation and Tags for each test case. +To achieve consistent formatting, they can be represented in columns just like test data, +by passing them as arguments to the Template Keyword: + +```robot +*** Settings *** +Documentation Different Tags and Documentation for each test case. +Test Template Template Keyword + + +*** Test Cases *** ARG1 ARG2 [Documentation] [Tags] +TestA aaa AAA Prints some message tagA +TestB bbb BBB Prints another message tagB + + +*** Keywords *** +Template Keyword + [Arguments] ${arg1} ${arg2} ${documentation} ${tag} + [Setup] Set Tags And Documentation ${documentation} ${tag} + Log Many ${arg1} ${arg2} + +Set Tags And Documentation + [Arguments] ${documentation} ${tag} + Set Test Documentation ${documentation} + Set Tags ${tag} +``` + +Square brackets around the column titles, `[Documentation]` and `[Tags]`, are merely to resemble the Settings +syntax. This is to distinguish them from the test data. diff --git a/website/docs/using_rf_in_ci_systems/ci/azure-devops.md b/website/docs/using_rf_in_ci_systems/ci/azure-devops.md index bea190cd..4f5b657d 100644 --- a/website/docs/using_rf_in_ci_systems/ci/azure-devops.md +++ b/website/docs/using_rf_in_ci_systems/ci/azure-devops.md @@ -1,7 +1,56 @@ -# ⛔ Azure DevOps +# Azure DevOps -## No content yet 😿 +**Azure DevOps** is a Microsoft platform that provides an end-to-end DevOps toolchain for developing and deploying software. It integrates with most leading tools on the market and is a great option for orchestrating a CI/CD pipeline. -Do you have experience with **Azure DevOps** and want to share your expertise? -Here is how to [contribute](/docs/about/contribute). -You can also [raise an issue](https://github.com/MarketSquare/robotframeworkguides/issues/new) and describe the content you would like to see here. \ No newline at end of file +To run **Robot Framework** tests in your Azure DevOps pipeline, you need to have **Python** and **Robot Framework** installed on the agents that execute the pipeline. You can use either Microsoft-hosted agents or set up your own self-hosted agents. + +## Setting Up the Pipeline + +In Azure DevOps, pipelines are defined using YAML files that specify the steps and jobs to be executed. Below is an example of an Azure DevOps pipeline that runs Robot Framework tests. + +### Example of Azure Pipelines YAML for Robot Framework + +```yaml showLineNumbers +# azure-pipelines.yml + +trigger: none +pr: none + +pool: + name: 'Your Agent Pool' # Replace with your agent pool name + +jobs: +- job: RunRobotTests + displayName: 'Run Robot Framework Tests' + steps: + + - task: UsePythonVersion@0 + inputs: + versionSpec: '3.10' # Specify the Python version you need + addToPath: true + + - script: | + python -m pip install --upgrade pip + pip install -r requirements.txt + displayName: 'Install Dependencies' + + - script: | + echo Running Robot Framework Tests + robot -d Results Tests/yourPathToTests.. + displayName: 'Run Robot Framework Tests' + continueOnError: true + + - task: PublishBuildArtifacts@1 + displayName: 'Publish Robot Framework Reports' + inputs: + PathtoPublish: 'Results' + ArtifactName: 'RobotFrameworkReports' + publishLocation: 'Container' + condition: succeededOrFailed() +``` +*Line 6-7:* `pool`: Specifies the agent pool that will run the pipeline. +*Line 10:* `job: RunRobotTests`: Defines a job called RunRobotTests. +*Line 14-17:* `task: UsePythonVersion@0`: Uses a specific version of Python on the agent. +*Line 19-22:* Installs necessary Python packages from requirements.txt. +*Line 24-28:* Executes the Robot Framework tests located in the specified test suite and outputs results to the Results directory. +*Line 30-36:* Publishes the test results as build artifacts, making them available for download. \ No newline at end of file diff --git a/website/docs/using_rf_in_ci_systems/ci/gitlab.md b/website/docs/using_rf_in_ci_systems/ci/gitlab.md index 15e6c3fc..9f667725 100644 --- a/website/docs/using_rf_in_ci_systems/ci/gitlab.md +++ b/website/docs/using_rf_in_ci_systems/ci/gitlab.md @@ -130,4 +130,4 @@ It is possible to define variables in the configuration, either at the top of th Also [predefined GitLab variables](https://docs.gitlab.com/ee/ci/variables/predefined_variables.html) or variables defined for your project settings can be used. Especially for handling secrets, it is recommended to use `CI Variables` in your project settings. -Check out the [GitLab CI Variables](https://docs.gitlab.com/ee/ci/variables/README.html) documentation for more information. \ No newline at end of file +Check out the [GitLab CI Variables](https://docs.gitlab.com/ee/ci/variables/) documentation for more information. diff --git a/website/docs/using_rf_in_ci_systems/ci/jenkins.md b/website/docs/using_rf_in_ci_systems/ci/jenkins.md index a35848f0..8237e4b2 100644 --- a/website/docs/using_rf_in_ci_systems/ci/jenkins.md +++ b/website/docs/using_rf_in_ci_systems/ci/jenkins.md @@ -134,6 +134,6 @@ These are steps you need to have in your Jenkins configuration. I recommend putt 1. ```npm config set registry https://local-site-for-node-modules``` \<-- here you need a server that is providing all required node modules; if it doesn't exist proxy config might work as well 1. Additional commands that might be needed could be ```npm config set strict-ssl false``` or ```npm config set always-auth true```depending how the server is configured 1. Then run ```rfbrowser init --skip-browsers``` to avoid the installation of browsers that may appear hard over the firewall -1. ... and use instead the ones installed by root when the agent was initialised by pointing with ```PLAYWRIGHT_BROWSERS_PATH```` to the location defined +1. ... and use instead the ones installed by root when the agent was initialised by pointing with ```PLAYWRIGHT_BROWSERS_PATH``` to the location defined Now you should be ready to execute tests. diff --git a/website/src/components/Grid/LibraryGrid.js b/website/src/components/Grid/LibraryGrid.js index 3329a0b9..baa3bc88 100644 --- a/website/src/components/Grid/LibraryGrid.js +++ b/website/src/components/Grid/LibraryGrid.js @@ -45,7 +45,7 @@ function LibraryGrid() { name: "Database Library", description: "Python based library for database testing.", localpage: "database", - urls: { GitHub: "https://github.com/franz-see/Robotframework-Database-Library", PyPI: "https://pypi.org/project/robotframework-databaselibrary/", Project: "http://franz-see.github.io/Robotframework-Database-Library/", Docs: "http://franz-see.github.io/Robotframework-Database-Library/api/1.2.2/DatabaseLibrary.html" }, + urls: { GitHub: "https://github.com/MarketSquare/Robotframework-Database-Library", PyPI: "https://pypi.org/project/robotframework-databaselibrary/", Project: "https://github.com/MarketSquare/Robotframework-Database-Library", Docs: "https://marketsquare.github.io/Robotframework-Database-Library/" }, tags: "Database" }, {