3

我跑

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

但它返回一个错误

newman run: error: too few arguments

根据他们的文档,我做得正确。

有没有人面对这个?有没有人解决这个问题?

4

1 回答 1

6

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

newman run <my_collection_path>/<my_collection>.json --folder <folder-name> -e <environment_path>/<my_environment>.json

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

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
于 2017-07-11T13:35:49.857 回答