1.先在postman中写好脚本。
2.再导出三个文件
1)全局变量文件
2)运行环境文件
3)脚本文件
3.如果有参数文件的话还要导出参数文件
4.执行以下语句 (根据自己导出的文件路径和名称做修改)
newman run E:
ewmanT126newman.postman_collection.json --environment E:
ewman百度的线上环境.postman_environment.json
--iteration-data E:
ewman工作簿1.csv --globals E:
ewmanWorkspace.postman_globals.json --iteration-count 2
--delay-request 10 --timeout-request 5000 --disable-unicode
--suppress-exit-code --ignore-redirects --bail --reporters html
--reporter-html-export E:
ewmanhtmlOutput.htm
5.为了方便,可将其作为.bat批处理文件