0

我正在尝试使用 newman 从命令行运行邮递员集合。我以前成功过,但是在最近的这个系列中,我遇到了一个错误。我正在使用以下命令

newman run [urlforjcollection] --reporters cli,json,html --reporter-json-
export C:\outputfile.json --reporter-
html-export C:\outputfile.html -e 
c:\QAEnvironment.json

这无法运行,我收到错误 .json 在此时是意外的。正如我所说,我在另一个集合上使用了这个确切的命令,它工作得很好。

有谁知道这个问题可能会发生什么?我的命令有问题还是邮递员中有一些设置可能导致它?

4

1 回答 1

2

我用谷歌搜索了你的错误,这似乎是命令行而不是 Postman 的问题;具体来说,在指定文件位置时需要使用双引号。试试这个:

newman run [urlforjcollection] --reporters cli,json,html --reporter-json-
export "C:\outputfile.json" --reporter-
html-export "C:\outputfile.html" -e 
"c:\QAEnvironment.json"
于 2017-08-04T14:51:41.103 回答