批处理运行多个Newman(Postman)测试集合

批处理运行多个Newman(Postman)测试集合,postman,web-api-testing,postman-collection-runner,Postman,Web Api Testing,Postman Collection Runner,我已经定义了几个Postman测试集合/文件夹及其关联的测试数据文件。通过邮递员收集跑步者和纽曼单独运行它们效果很好。我想将多个运行批处理在一起,如下所示。Windows中的bat: SET postman_collection=Regression.postman_collection.json SET postman_environment=Development.postman_environment.json SET postman_folder="Order details" SET

我已经定义了几个Postman测试集合/文件夹及其关联的测试数据文件。通过邮递员收集跑步者和纽曼单独运行它们效果很好。我想将多个运行批处理在一起,如下所示。Windows中的bat:

SET postman_collection=Regression.postman_collection.json
SET postman_environment=Development.postman_environment.json

SET postman_folder="Order details"
SET postman_data="orders.json"
newman run %postman_collection% -r html,cli -e %postman_environment% --folder %postman_folder% -d %postman_data%

SET postman_folder="Fuzzy Search"
SET postman_data="fuzzy search regression.csv"
newman run %postman_collection% -r html,cli -e %postman_environment% --folder %postman_folder% -d %postman_data%

SET postman_folder="Sorting"
SET postman_data=""
newman run %postman_collection% -r html,cli -e %postman_environment% --folder %postman_folder% -d %postman_data%
但是,执行在第一次newman运行完成后结束。我认为它出于某种原因终止了控制台

我怎样才能实现我想做的事情呢?我的测试结构是否有误?感谢您的帮助

您只需在newman命令之前使用“call”,如下所示:

SET postman_collection=Regression.postman_collection.json
SET postman_environment=Development.postman_environment.json

SET postman_folder="Order details"
SET postman_data="orders.json"

call newman run %postman_collection% -r html,cli -e %postman_environment% --folder %postman_folder% -d %postman_data%

SET postman_folder="Fuzzy Search"
SET postman_data="fuzzy search regression.csv"

call newman run %postman_collection% -r html,cli -e %postman_environment% --folder %postman_folder% -d %postman_data%

你有没有试过从一个js文件中执行同样的操作,并在一个节点中运行js?我现在正在尝试这个过程。我希望我能把一个快速的批处理文件放在一起。谢谢