PostMan-NewMan生成測試報告(三)
一、使用Newman構建一個html測試報告
1、首先安裝生成html的組件
npm install newman-reporter-html
2、生成html測試報告命令
newman run C:\TestSigle.postman_collection.json -r html --reporter-html-export C:\test.html
命令剖析:
- newman run C:\TestSigle.postman_collection.json :測試的接口集合
- -r html --reporter-html-export :生成html測試報告
- C:\test.html :報告生成路徑及設置報告名稱
3、查看測試報告
在設置報告生成路徑下找到生成html報告文件,打開查看。