【问题标题】:Build postman collection using newman in Jenkins - No Result in Console在 Jenkins 中使用 newman 构建邮递员集合 - 控制台中没有结果
【发布时间】:2018-09-23 00:11:07
【问题描述】:

我在 jenkins 控制台输出上收到 Build: SUCCESS 消息,但没有像迭代、执行与失败等详细结果。

我正在使用“newman run https://www.getpostman.com/collections/559ca99c65470714895de”作为“执行 Windows 批处理命令”。

我是否缺少任何插件?请帮忙?

【问题讨论】:

  • 您是否在全球范围内安装了newman
  • 您提供的网址中的集合无效
  • 确保在构建过程中安装了node,然后安装了newman

标签: jenkins postman newman


【解决方案1】:

您提供的收藏链接无效。 在运行 newman 之前,请确保您有以下配置:

  1. npm 和 node 在 jenkins 上全局安装。 如果没有请参考Node Installation
  2. newman 全局安装在 jenkins 上。 如果不是$ npm install -g newman
  3. 请在 shell 上执行命令(而不是在 Windows 批处理命令上)
  4. 提及 cli 报告器和 exitCode 以让 jenkins 知道命令中的任何错误,如 $ newman run <your collection goes here> -r cli --exitCode 1

推荐:创建一个节点应用并运行您的测试以获得高级报告和易于维护。例如:Sample Newman Node Application with Custom Reporters

【讨论】:

    猜你喜欢
    • 2019-12-14
    • 2019-03-28
    • 2020-08-06
    • 1970-01-01
    • 2014-08-02
    • 2016-07-24
    • 2017-11-22
    • 2020-01-04
    • 2018-04-20
    相关资源
    最近更新 更多