Reputation: 5236
I can succesfully run postman tests in azure devops is there a way to
any suggestions
Upvotes: 0
Views: 1243
Reputation: 8298
Check this extension Get Postman Scripts, by default it will download your postman json file and save it to $(Build.ArtifactStagingDirectory)
, then we could push the files to Azure DevOps repo via git cmd.
cd $(Build.ArtifactStagingDirectory)
git config --global user.name "{email}"
git checkout master
git add .
git commit -m "Sync postman json file to Azure DevOps Repo"
git push https://{PAT}@dev.azure.com/{org name}/{project name}/_git/{repo name}
You could also check this doc for more details.
Update1
YAML
- task: oneLuckiGetPostmanScripts@1
displayName: 'Get Postman Script'
inputs:
fileLocation: '$(Build.ArtifactStagingDirectory)\Postman'
apiKey: '{key}'
Result:
Upvotes: 2