代码之家  ›  专栏  ›  技术社区  ›  sudhansh_

newman run--文件夹e不执行,表示传递的参数太少

  •  3
  • sudhansh_  · 技术社区  · 7 年前

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

    但它返回一个错误

    newman run: error: too few arguments

    根据他们的 documentation ,我做得对。

    1 回复  |  直到 7 年前
        1
  •  6
  •   Bernard Vander Beken Harald Coppoolse    4 年前

    您是否设置了收藏文件源?

    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