postman導出html 或htmlextra報告


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" ,就是網頁的標簽頁 名稱

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM