在竹CI服务器中运行邮差脚本

问题描述 投票:-1回答:1

我的要求是用竹子运行邮差脚本。我们有一个collection.json的存储库,但是,由于我的环境文件有一些敏感数据,如client_idsecret_idusernamepassword等,我无法将其推送到我的仓库。

请告诉我如何使用Newman在竹子中运行我的收藏品。

continuous-integration postman bamboo newman
1个回答
0
投票

如果您有邮递员帐户,则可以使用您的环境变量:

  1. 您需要为Postman项目获取X-Api-Key(在Postman帐户上),然后您将能够使用Postman API调用来获取集合和环境ID。 Here's the link with Postman API documentation.
  2. 将纽曼安装到您的npm。 Here are the details about Newman
  3. 从您的竹子运行命令行,将触发Postman测试运行。该命令将以这种方式显示: newman run https://api.getpostman.com/collections/ {{collectionId}}?apikey = {{ApiKey}} -e https://api.getpostman.com/environments/ {{EnvironmentId}}?apikey = {{ApiKey}}
© www.soinside.com 2019 - 2024. All rights reserved.