在本地(MAC OSX)neman html报告生成上运行它时,我收到找不到“ htmlextra”报告器

当我使用参数-r htmlextra运行newman run命令时,我收到以下消息。我已经使用-g(全局)安装了htmlextra的地方。但是当我创建一个newman .js文件时,我能够执行。请告知可能出了什么问题。

newman: could not find "htmlextra" reporter
ensure that the reporter is installed in the same directory as newman
please install reporter using npm

谢谢。

zy870226 回答:在本地(MAC OSX)neman html报告生成上运行它时,我收到找不到“ htmlextra”报告器

此问题已解决。通过将newman-reporter-html,newman-reporter-htmlextra软件包复制到newman-> node_modules目录中。

理想情况下,模块必须位于node_modules目录中。

它在Mac OS X上。我希望类似的方法也适用于基于Windows OS的计算机。

,

如果您通过npm安装了htmlextra记者,请安装-g htmlextra,然后理想情况下要生成报告,您应该使用

newman运行yourpostmancollection.json -r htmlextra --reporter-htmlextra-export pathToHtmlReportFile

运行此命令后,应在给定路径上生成报告文件

,

您可能已经使用 npm i -g newman 安装了 newman,并使用 sudo 或其他方式安装了 html exporter。

确保如果你安装一个包 -g(全局)然后另一个同样,如果 1 sudo 然后另一个也是

本文链接:https://www.f2er.com/3140085.html

大家都在问