Configure Azure Devops Pipelines to Upload Test Artifacts and Perform a Test Run
Create the Azure Pipelines project the way you normally would.
Add the Testery API Token as a secret variable in your project (follow these steps: https://docs.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch#secret-variables). The Testery API token can be found on the Settings tab on the Integrations sub-tab.
Add the following task to your
azure-pipelines.yml
. Make sure you update the command arguments to match your project.- task: PowerShell@2 inputs: displayName: Run Tests in Testery targetType: inline script: | pip -q install testery --upgrade testery upload-build-artifacts --token "${env:TESTERY_TOKEN}" --project "example-specflow-dotnet-core" --path "$(Build.SourcesDirectory)\Web.Specs\bin\Release\netcoreapp3.0\" --build-id "$(Build.BuildNumber)" --zip-dir testery create-test-run --token "${env:TESTERY_TOKEN}" --git-ref "$(Build.SourceVersion)" --project "example-specflow-dotnet-core" --environment "dev" --build-id "$(Build.BuildNumber)" env: TESTERY_TOKEN: $(TesteryToken)