Windows 10 Newman 在 Jenkins 中未被识别为内部或外部命令
Newman is not recognised as an internal or external command in Jenkins on Windows 10
我在 Jenkins 中使用 newman 来执行 postman 集合。
简要背景:我已经在 C:\Program Files\nodejs 中安装了 node js,newman 是全局安装的,所以它安装在这里 - C:\Users\waniijag\AppData\Roaming\npm\node_modules\newman
关于环境变量:
- C:\Users\waniijag\AppData\Roaming\npm在环境变量中为用户添加了用户变量
- 此外,我在 User 的 Path 变量中附加了 C:\Program Files\nodejs用户变量和系统变量。
现在当我执行 - “newman 运行 Postman collection” OR C:\Users\waniijag\AppData\Roaming\npm\node_modules\newman 运行 postman collection 时,我得到的错误是:
'C:\Users\waniijag\AppData\Roaming\npm\node_modules\newman' is not recognized as an internal or external command,
operable program or batch file.
我不明白我哪里错了-
提前致谢。
将包含此文件的目录添加到您的环境变量中。它将出现在以下任一位置:
C:\Users\waniijag\AppData\Roaming\npm\node_modules\.bin
或
C:\Users\waniijag\AppData\Roaming\npm
或直接 运行 为:
"C:\Users\someuser\AppData\Roaming\npm\newman" run
,假设 newman.cmd 在 npm 文件夹中,使用此命令
我在 Jenkins 中使用 newman 来执行 postman 集合。
简要背景:我已经在 C:\Program Files\nodejs 中安装了 node js,newman 是全局安装的,所以它安装在这里 - C:\Users\waniijag\AppData\Roaming\npm\node_modules\newman
关于环境变量:
- C:\Users\waniijag\AppData\Roaming\npm在环境变量中为用户添加了用户变量
- 此外,我在 User 的 Path 变量中附加了 C:\Program Files\nodejs用户变量和系统变量。
现在当我执行 - “newman 运行 Postman collection” OR C:\Users\waniijag\AppData\Roaming\npm\node_modules\newman 运行 postman collection 时,我得到的错误是:
'C:\Users\waniijag\AppData\Roaming\npm\node_modules\newman' is not recognized as an internal or external command,
operable program or batch file.
我不明白我哪里错了- 提前致谢。
将包含此文件的目录添加到您的环境变量中。它将出现在以下任一位置:
C:\Users\waniijag\AppData\Roaming\npm\node_modules\.bin
或
C:\Users\waniijag\AppData\Roaming\npm
或直接 运行 为:
"C:\Users\someuser\AppData\Roaming\npm\newman" run
,假设 newman.cmd 在 npm 文件夹中,使用此命令