Postman newman run——folder-e不执行,表示传递的参数太少

Postman newman run——folder-e不执行,表示传递的参数太少,postman,newman,Postman,Newman,我跑 newman run--folder-e 但它返回一个错误 newman运行:错误:参数太少 根据他们的说法,我做得对 有人面对过吗?有人解决了这个问题吗?您设置了收藏文件源了吗? --仅当使用集合中特定文件夹中的集合集(即集合/folder1)时,才需要文件夹。您的命令应如下所示: newman run <my_collection_path>/<my_collection>.json --folder <folder-name> -e <env

我跑

newman run--folder-e

但它返回一个错误

newman运行:错误:参数太少

根据他们的说法,我做得对


有人面对过吗?有人解决了这个问题吗?

您设置了收藏文件源了吗? --仅当使用集合中特定文件夹中的集合集(即集合/folder1)时,才需要文件夹。您的命令应如下所示:

newman run <my_collection_path>/<my_collection>.json --folder <folder-name> -e <environment_path>/<my_environment>.json
newman run/.json——文件夹-e/.json
例如,下面是我使用的一个命令,该命令有效(尽管我不尝试播放我收藏的文件夹中设置的请求):

newman运行C:\Users\\Desktop\Tests.postman\u collection.json-e C:\Users\\Desktop\Tests.postman\u environment.json--reporters cli,html,json,junit--reporter cli无摘要--reporter junit导出C:\Users\\Desktop\export\u test.xml--reporter html导出C:\Users\\Desktop\export\u test.html--禁用unicode

我通常以与您的示例相同的方式运行newman,这也适用于我。您能举一个文件夹运行的示例吗?如果我正确理解了文档,通过使用--folder,我正在尝试运行特定文件夹中的所有集合。我检查了这个,它对我有效:newman运行C:\\.json--folder”“-e,它可以工作。仅播放选定子文件夹中的测试。你应该检查你的语法,也许你遗漏了什么(比如把文件夹的名称括在“”之间)?我一开始就误解了这个命令。该命令用于运行测试文件中的特定文件夹\n我试图让它执行文件夹中的所有测试文件。我还遇到了最新的newman 4.5.3的问题:C:\Users\lab2\AppData\Roaming\npm>newman run--folder C:\Users\lab2\Desktop-e s tand_27_146.json-d Urdata 6.json lk_ur_reg_test20190807.json错误:Enoint:没有这样的文件或目录,打开“C:\Users\lab2\AppData\Roaming\np m\stand\u 27\u 146.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