1.3postman+newman命令运行

1、安装newman,npm安装可查看1.2
npm install newman --global
2、安装完成可以用命令查看版本信息
newman --version
3、下载需要运行的postman_collection.json,和postman_environment.json,postman_globals.json
4、

newman run 用户集合脚本文件.json --environment 环境变量文件.json --iteration-data 外部csv数据文件.csv --globals 全局变量的json文件 --timeout-request 500(超时时间) --reporters html  --reporter-html-export 指定报告文件名.html

case1
如果执行时报错,需要安装newman-reporter-html,执行:nmp install -g newman-reporter-html


image.png

再次执行


image.png
newman run D:\postman\巴士集团.postman_collection.json --environment D:\postman\正式环境.postman_environment.json --reporters html --reporter-html-export htmlOutput.html
执行报告
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容