Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
newman-reporter-html
Advanced tools
Readme
HTML reporter for Newman that provides the information about the collection run in HTML format. This needs to be used in conjunction with Newman so that it can recognize HTML reporting options.
The installation should be global if newman is installed globally, local otherwise. (Replace -g from the command below with -S for a local installation)
$ npm install -g newman-reporter-html
In order to enable this reporter, specify html
in Newman's -r
or --reporters
option.
$ newman run https://www.getpostman.com/collections/631643-f695cab7-6878-eb55-7943-ad88e1ccfd65-JsLv -r html
CLI Option | Description |
---|---|
--reporter-html-export <path> | Specify a path where the output HTML file will be written to disk. If not specified, the file will be written to newman/ in the current working directory. |
--reporter-html-template <path> | Specify a path to the custom template which will be used to render the HTML report. This option depends on --reporter html and --reporter-html-export being present in the run command. If this option is not specified, the default template is used |
Custom templates (currently handlebars only) can be passed to the HTML reporter via --reporter-html-template <path>
with --reporters html
and --reporter-html-export
.
The default template is used in all other cases.
The CLI functionality is available for programmatic use as well.
const newman = require('newman');
newman.run({
collection: require('./examples/sample-collection.json'), // can also provide a URL or path to a local JSON file.
reporters: 'html',
reporter: {
html: {
export: './htmlResults.html', // If not specified, the file will be written to `newman/` in the current working directory.
template: './customTemplate.hbs' // optional, this will be picked up relative to the directory that Newman runs in.
}
}
}, function (err) {
if (err) { throw err; }
console.log('collection run complete!');
});
newman-reporter-html | newman | node |
---|---|---|
v0.1.0 | >= v3.10.0 | >= v6.x |
v1.0.0 | >= v4.0.0 | >= v6.x |
The reporter and newman must be installed at the same level, the installation should be global if newman is installed globally, local otherwise.
You are most probably getting in-built reporter output used in older versions of newman, Please check the newman's compatibility section above.
If you are facing any other problem, please check the open issues or create new.
Sign in using your Postman account to participate in the discussions and don't forget to take advantage of the search bar - the answer to your question might already be waiting for you! Don’t want to log in? Then lurk on the sidelines and absorb all the knowledge.
This software is licensed under Apache-2.0. Copyright Postdot Technologies, Inc. See the LICENSE.md file for more information.
FAQs
Newman HTML Reporter
The npm package newman-reporter-html receives a total of 53,771 weekly downloads. As such, newman-reporter-html popularity was classified as popular.
We found that newman-reporter-html demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.