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 )
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.
Have you tried using the htmlextra report by @danny-dainton
I’m literally using that report as we speak
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.
Love it @postman-paul540 - The dark mode is only there for you…
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?
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
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 @postman-paul540 is using to not show the request/response Headers in the report. It is just one of a few flags included with the reporter.
Hello, I was about to post exactly the same question. Wondering if the solution provided here worked for what you needed. I’m looking to run a collection via Newman with multiple files and having one consolidated summary (pretty much what you where looking for). Any suggestions will be appreciated.