报错描述:
postman集合测试,通过newman命令执行postman集合。
运行命令:newman run Postman_API.postman_collection.json -d data.json -r html,报错newman: could not find “html” reporter,如下图所示:
提示:newman: could not find "html" reporter
ensure that the reporter is installed in the same directory as newman
run `npm install newman-reporter-html`
解决方式:
需要安装newman-reporter-html,安装运行命令:npm install -g newman-reporter-html
C:\Users\Administrator\Desktop\pmtest>npm install -g newman-reporter-html
npm WARN newman-reporter-html@1.0.5 requires a peer of newman@4 but none is installed. You must install peer dependencies yourself.
安装完成,重新运行命令:newman run Postman_API.postman_collection.json -d data.json -r html,报告导出成功。