步骤
1. 安装nodejs
查看node和npm的版本
2. 安装cnpm包管理工具
npm install -g cnpm --registry=https://registry.npm.taobao.org
3. 安装Newman和相关的两个插件模块
cnpm install -g newman
cnpm install -g newman-reporter-html
cnpm install -g newman-reporter-htmlextra
导出postman测试脚本
Newman使用方法
newman run 导出的测试json文件 [选项]
- -e 指定环境变量json文件
- 如何导出
- 如何导出
- -g 全局变量json文件
-
- -r html
- -r htmlextra
-
- --reporter-html-export xxx.html 指定生成的html文件的路径
-
- -n number 指定迭代的次数