Newman测试
配合Jenkins,写好脚本即可
一、环境
1.Node
下载
wget https://nodejs.org/dist/v8.11.3/node-v8.11.3-linux-x64.tar.xz
解压到/usr/local/node
tar -xvf node-v14.17.5-linux-x64.tar.xz
重命名
mv node-v14.17.5-linux-x64 node-14.17.5
配置环境变量
vim /etc/profile
# 末尾添加
export NODE_HOME=/usr/local/node/node-14.17.5
export PATH=$NODE_HOME/bin:$PATH
source /etc/profile
2.Newman
npm install -g newman
npm install -g newman-reporter-html
二、使用
linux直接看
newman run d.postman_collection.json
生成html文件
newman run d.postman_collection.json -r html