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