postman導出html 或htmlextra報告
安裝node.js
安裝newman
) npm install newman
安裝html插件
npm install -g newman-reporter-html
npm install -S newman-reporter-html
或安裝htmlextra插件
npm install -g newman-reporter-htmlextra
npm install -S newman-reporter-htmlextra
導出報告:(我一般設全局,進對應文件里生成報告,不用再指定路徑了)
1.Newman run .json -g 全局 -e 環境 -d 數據 -r html
2.Newman run .json -g 全局 -e 環境 -d 數據 -r htmlextra
3. Newman run .json -g 全局 -e 環境 -d 數據 -r htmlextra +參數
--reporter-htmlextra-export ./results/report.html
指定路徑文件名
--reporter-htmlextra-showOnlyFails
僅顯示測試失敗的請求
--reporter-htmlextra-title "My Newman Report"
(中上方大字)為您的報表提供不同的主體。如果未設置,報告將顯示“ Newman Run Dashboard”
--reporter-htmlextra-browserTitle
The default name is "Newman Summary Report" ,就是網頁的標簽頁 名稱