Newman - Run collection with several CSV files and See only Summary

Hi,

I was looking for a way to process several CSV files in 1 go via Newman, and ended up using BATCH file.
Here’s and example of what I would use in the command line:

call newman run COLLECTION_FILE_NAME -e ENV_JSON_FILE_NAME -d CSV_FILE_NAME1
call newman run COLLECTION_FILE_NAME -e ENV_JSON_FILE_NAME -d CSV_FILE_NAME2
call newman run COLLECTION_FILE_NAME -e ENV_JSON_FILE_NAME -d CSV_FILE_NAME(n)

( btw, if anyone has a suggestion on a better way to do this, with example, please let me know :slight_smile: )

What I am looking for is a way to only see the Summary table at the end and not each Iteration, or (if possible) just the total Iterations done on each command.

Any ideas?
Newman version - 4.6.0

Thanks,
Jacob

Have you tried using the htmlextra report by @dannydainton
I’m literally using that report as we speak :slight_smile:
I know that report shows a breakdown per iteration.

I’m not using iterations, but here’s an example call:

newman run "https://api.getpostman.com/collections/{put-your-collection-id-here}?apikey={put-your-postman-pro-api-key-here}" --environment "https://api.getpostman.com/environments/{put-your-environment-id-here}?apikey={put-your-postman-pro-api-key-here}" --reporters htmlextra --reporter-htmlextra-omitHeaders

This will output an HTML report (with a sexy dark theme option) that will look like this.
The number of iterations will show at the top, only 1 is shown for me as I didn’t iterate the tests.

1 Like

Love it @pfarrell - The dark mode is only there for you…:heart_eyes:

I think what @mac300 is looking for is more of a combined report of all the runs though right? Your script is just running X number of collections with a different instance of Newman each time. As it’s a one for one kind of deal, you’re always going to get multiple outputs that way.

Have you tried Newman as a library and create a node script iterates through your collections/datafile, holds that aggregated info somewhere and then provides a final report?

1 Like

Thanks…
Ok, so I went to that page, and installed the “reporter” as was requested.
I then added the parameters shown in the command example you gave to what I use in the newman command via Command Prompt, and after it was done it did not do anything:

newman run COLLECTION_FILE_NAME -e ENV_JSON_FILE_NAME -d CSV_FILE_NAME1 --reporters htmlextra --reporter-htmlextra-omitHeaders

I’m sure I’m missing something :slight_smile:

Can you shed some light into what that is?

Could you expand on “Did not do anything” :grin:

By default, it creates a report in a /newman directory where you ran the command, if it’s not there it will create the directory first.

The omitHeaders flag can be removed, that just what @pfarrell is using to not show the request/response Headers in the report. It is just one of a few flags included with the reporter.

1 Like

Ok, I see it now…
I’ll test this around and see if we can use it to what we need :slight_smile:
Appreciate your assistance…

1 Like