解决postman命令执行过程中提示newman: could not find “html“ reporter的问题

报错描述:

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,安装运行命令:nmp install -g newman-reporter-html

C:\Users\Administrator\Desktop\pmtest>npm install -g newman-reporter-html
npm WARN [email protected] 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,报告导出成功。

猜你喜欢

转载自blog.csdn.net/DaisyCold/article/details/107582228