Search code examples
postman-collection-runnernewman

Postman - Newman htmlextra report generation Issue


I am running the collection json file in Newman and using htmlextra for report generation.

  1. When I use this command I am not getting the report generated newman run "Telus Upgrade Service Testing.postman_collection.json" -e "Upgrade Services Variables.postman_environment.json" --reporter-htmlextra-export -k.

  2. When I use this code, the report is getting generated in working directory newman run "Telus Upgrade Service Testing.postman_collection.json" -e "Upgrade Services Variables.postman_environment.json" --reporter-htmlextra-export -r htmlextra -k.

The problem is when I use fist command in cmd I am able to see the all the services are running but the report is not generated.

When I use 2nd command in cmd I am not seeing any services running but in backend, the services are running and the report got generated.

Kindly provide a solution for me, I want to see the services running in cmd and report should be generated.


Solution

  • In your first command, you're not specifying a reporter to use -r htmlextra so it will run the cli reporter as default but also, you're using the --reporter-htmlextra-export but not passing in a location to export the report file so there is not real need to add that arg.

    newman run "Telus Upgrade Service Testing.postman_collection.json" -e "Upgrade Services Variables.postman_environment.json" --reporter-htmlextra-export -k

    In the second command, to see the cli output, as well as the htmlextra report, you need to tell Newman to show it.

    Use the -r cli,htmlextra arg in your command. You're not passing in a report file location in this command either so it will create this in the Newman directory. The --reporter-htmlextra-export flag is redundant if you're not wanting to change the export location.

    newman run "Telus Upgrade Service Testing.postman_collection.json" -e "Upgrade Services Variables.postman_environment.json" --reporter-htmlextra-export -r htmlextra -k

    All the options htmlextra options and how to use the reporter can be found here:

    https://github.com/DannyDainton/newman-reporter-htmlextra#options