1.安装nodejs
下载地址:http://nodejs.cn/download/
验证nodejs是否安装成功:
在cmd中输入 node -v ,看到输出node的版本信息,代表安装成功
2.安装newman
在cmd中输入: npm install -g newman
验证newman是否安装成功:
在cmd中输入 newman -v,看到输出newman的版本信息,代表安装成功
3.安装newman-reporter-html
在cmd中输入: npm install -g newman-reporter-html
4.将json转换为html
首先:打开cmd,用cd命令进入json文件所在文件夹的位置
其次:输入newman run file.json -r html --reporter-html-export file.html
其中file.json为要转的json文件名称,file.html为转成html的文件名称
运行完后html文件就可以在文件夹中看到file.html