【发布时间】:2021-06-13 22:10:33
【问题描述】:
我可以在 azure devops 中成功运行邮递员测试有没有办法
- 创建一个存储库“MyCollection”
- 运行“Cron”管道,获取集合并将其保存到存储库?
任何建议
【问题讨论】:
标签: postman azure-devops-rest-api
我可以在 azure devops 中成功运行邮递员测试有没有办法
任何建议
【问题讨论】:
标签: postman azure-devops-rest-api
勾选这个扩展Get Postman Scripts,默认它会下载你的邮递员json文件并保存到$(Build.ArtifactStagingDirectory),然后我们可以通过git cmd将文件推送到Azure DevOps repo。
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}
您也可以查看doc 了解更多详情。
更新1
YAML
- task: oneLuckiGetPostmanScripts@1
displayName: 'Get Postman Script'
inputs:
fileLocation: '$(Build.ArtifactStagingDirectory)\Postman'
apiKey: '{key}'
结果:
【讨论】: