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报告文件,打开查看。