newman的安装
1.先安装node.js , 下载地址:https://nodejs.org/en/ ,双击后根据提示下一步安装完成
2. 在dos窗口中输入 :node -v 查看,如下图所示表示安装好了
3. 输入命令安装newman:npm install -9 newman
4.输入命令安装 npm install -g newman-reporter-html
5.如下图,安装成功
导出
1.newman run “用例的地址” -e “环境的地址” -g “全局变量的地址” -r cli,html,json,junit(导出的格式可以是cli,html,json,junit) --reporter-html-export “导出的地址”
newman run "e:\\yongli.json" -e "e:\\huanjin.json" -g "e:\\quanju.json" -r cli,html,json,junit --reporter-html-export "e:\\report.html"
以管理员的身份运行cmd
newman run F:\test.json -e F:\environment.json -k -r html --reporter-html-export htmlOut.html
生成html报告