-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #68 from hassineabd/patch-1
Add azure DevOps documentation for running robot framework CI
- Loading branch information
Showing
1 changed file
with
59 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |