newman run --folder -e 不执行,说传递的参数太少

sud*_*sh_ 3 postman newman

我跑

newman run --folder <folder path> -e <environment path>

但它返回一个错误

newman run: error: too few arguments

根据他们的文档,我做对了。

有人遇到过这种情况吗?有没有人解决这个问题?

A.J*_*oly 6

您是否设置了 collection-file-source ?--folder 仅当您使用该集合中特定文件夹中的集合集(即 collection/folder1)时才需要。你应该有你的命令如下:

newman run <my_collection_path>/<my_collection>.json --folder <folder-name> -e <environment_path>/<my_environment>.json
Run Code Online (Sandbox Code Playgroud)

例如,这是我使用的并且有效的命令(尽管我不会尝试播放在我的收藏文件夹中设置的请求):

newman run C:\Users\<myself>\Desktop\Tests.postman_collection.json -e C:\Users\<myself>\Desktop\Tests.postman_environment.json --reporters cli,html,json,junit --reporter-cli-no-summary --reporter-junit-export C:\Users\<myself>\Desktop\export_test.xml --reporter-html-export C:\Users\<myself>\Desktop\export_test.html --disable-unicode
Run Code Online (Sandbox Code Playgroud)