Newman uses the concept of reporters and templates to generate HTML reports for the executed collection.
Hence, to generate HTML reports, you first need to install a reporter. You can install any of the available HTML reporters like
Newman-reporter-html as a node package through the below command.
npm install -g newman-reporter-html
Once the HTML reporter is installed, we can use the Newman command to run the collection with -r flag i.e. the reporter flag and specify the reporter name as HTML.
The below command is used :
newman run {{path to collection json}} -e {{path to environment json if any}} -r html
Please note that as we have not mentioned the name or folder where we want the reports to get generated, by default the reports will be generated in a folder named “Newman” that gets created in the same directory where the Newman command is executed from.