第一步:下载安装nodejs
下载地址:https://nodejs.org/zh-cn/
按照默认安装就完事了
配置环境变量到path路径下:
![](https://img.haomeiwen.com/i13136383/302144b47c572a88.png)
![](https://img.haomeiwen.com/i13136383/eeb686badd170b3f.png)
第二步:安装newman和html
npm install -g newman
npm install newman-reporter-html
![](https://img.haomeiwen.com/i13136383/cae2f4f9863c1f63.png)
第三步:在postman内保存接口并导出为json格式文件
![](https://img.haomeiwen.com/i13136383/1e958f9c60d4ed7a.png)
![](https://img.haomeiwen.com/i13136383/3dea793b7803365f.png)
![](https://img.haomeiwen.com/i13136383/fb3c4ea184aa1f75.png)
第四步:在导出文件目录执行如下命令
newman run test_weibo.postman_collection.json -k -r html --reporter-html-export result1.html
![](https://img.haomeiwen.com/i13136383/44b575541362a2cf.png)
第五步:查看测试报告
![](https://img.haomeiwen.com/i13136383/4bda3151f6f9d57e.png)
网友评论