PostMan-NewMan生成測試報告(三)

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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章