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" ,就是网页的标签页 名称

 

posted @ 2020-06-29 00:07  沈一愣  阅读(1973)  评论(0编辑  收藏  举报