【问题标题】:Using newman in jenkins through powershell or windows batch command通过 powershell 或 windows 批处理命令在 jenkins 中使用 newman
【发布时间】:2018-06-07 15:03:40
【问题描述】:

我正在寻找运行以下链接

cd c:\Users\Testing
newman run https://www.getpostman.com/collections/abcrtetv345692ty99aer12 -e c:\postman\environment\Env2.postman_environment.json  

我在 jenkins 中遇到以下错误:

'node' 未被识别为内部或外部命令, 可运行的程序或批处理文件。
构建步骤“执行 Windows 批处理命令”将构建标记为失败 完成:失败

【问题讨论】:

    标签: jenkins jenkins-plugins newman


    【解决方案1】:

    Newman 是一个旨在在 node.js 上运行的 javascript 应用程序。您需要安装 node.js 并确保 node.exe 在您的路径中。

    https://nodejs.org/en/download/ 下载 windows 安装程序 - 并将其安装在您的 jenkins 从属设备上(如果是单机安装,则安装在主设备上)。

    编辑:确保 node.exe 在用户的路径中,Jenkins 在该路径下执行,而不仅仅是您的用户。

    【讨论】:

    • 我的电脑上确实安装了 nodejs,路径中也提到了它
    • 在什么用户的路径中?如果它存在于您用户的路径中,并不意味着它存在于 jenkins 用户的路径中。
    猜你喜欢
    • 1970-01-01
    • 2022-08-21
    • 1970-01-01
    • 2018-01-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-02-01
    • 1970-01-01
    相关资源
    最近更新 更多