How-to-append-newman-htmlextra-results-to-existing-htmlextra-report-file

postman newman

i have two newman commands

  1. newman run collection.json -e env.json --folder create_clients -d clients.csv -r htmlextra --htmlreporter-export reporter.html
  2. newman run collection.json -e env.json --folder create_orders -d orders.csv -r htmlextra --htmlreporter-export reporter.html

after command #2 is executed reporter.html is overwritten, i want results to be appended.

is there any possibility, please suggest, Thanks

Hey @rajashekary458,

Welcome to the community! :trophy:

I left an answer for you over on your Stackoverflow question but I will add it here as well, just in case you have any follow up questions. Itโ€™s easier to ask here :slight_smile:

The reporter doesnโ€™t work in that way. You cannot append the results from a previous run as it creates a brand new report again.

Contextually, those are 2 different Collection runs. It would be the same if you were to run those in the app and see the results in the Runner.

If you wanted to see both reports individually, you would need to give them a different name when exporting, or remove the export flag and the default filename would be created in the /newman directory.

Hi Danny,

Thanks for the quick response.
I understand the reporter limitations, I have a collection with two folders, both folders need two different CSV data files. That is the reason for running the same collection with two diff folders and two diff data files.

But the problem is that Reports, for one collection two different reports are generated. Any workaround for this, Please suggest.

Youโ€™re still running 2 different Collection runs though, it doesnโ€™t matter if the Collection that youโ€™re using is the same one.

Each time you run that command, it uses the same internal template to create the report you see in the browser. There isnโ€™t a way to append the previous results from any older report if that was the case and you continued to add on to a single report, it would be huge and you would get to the point where you would struggle to even open the file :slight_smile:

The only quick way that I can see that working is to combine the 2 data files so that the variable references in the CSV columns are being linked to the data points in those different folders/request and running the single Collection without the --folder command.

Itโ€™s not only a limitation with my reporter, but itโ€™s also the same with the standard HTML reporter and if you were running the Collection with a data file in the Postman app, without involving Newman.

You can only currently run 1 Collection at a time and with 1 datafile at a time.

Agreed, i will try to restructure my framework so that only one data file is used.

Thanks Danny, appreciate the help.

1 Like