Skip to content

Commit

Permalink
Merge pull request #68 from hassineabd/patch-1
Browse files Browse the repository at this point in the history
Add azure DevOps documentation for running robot framework CI
  • Loading branch information
manykarim authored Nov 13, 2024
2 parents 316b718 + 541c8a8 commit 87f5272
Showing 1 changed file with 59 additions and 5 deletions.
64 changes: 59 additions & 5 deletions website/docs/using_rf_in_ci_systems/ci/azure-devops.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,61 @@
# ⛔ Azure DevOps
# Azure DevOps

**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.

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
# 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()
```
## Explanation of parameters
Pool: Specifies the agent pool that will run the pipeline.
Job: Defines a job called RunRobotTests.
UsePythonVersion@0: Uses a specific version of Python on the agent.
Install Dependencies: Installs necessary Python packages from requirements.txt.
Run Robot Framework Tests: Executes the Robot Framework tests located in the specified test suite and outputs results to the Results directory.
PublishBuildArtifacts@1: Publishes the test results as build artifacts, making them available for download.
## No content yet 😿
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.

0 comments on commit 87f5272

Please sign in to comment.