postman

1.3postman+newman命令运行

2021-01-04  本文已影响0人  今天学习吗

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
执行报告
上一篇 下一篇

猜你喜欢

热点阅读