Export Collection Run Results to csv

Hi all,

I am new to Postman and API testing world. I was able to create and execute some basic tests and run collections. However, I was wondering if there are ways on how can I export the following to a csv file every collection run:

  • Folder Name/Test Name
  • Request URL
  • Request Body (if applicable)
  • Status code, response time and size
  • Response Body
  • Test Results (PASS or FAILED)

I would really appreciate your help.

Hey @andrea-ree

You wouldn’t be able to export that from the Collection Runner in the app as a csv but you could achieve something similar using Newman and one of the custom reporters.

This newman-reporter-csv reporter would cover a lot of what you’re looking to extract.

Test results can be exported using the Postman app but these are only in JSON and will not contain all the information that you’re looking to extract.

Thanks @danny-dainton, also do you have any recommendations or insights regarding resources or strategies for studying or acquiring proficiency in the utilization of the Newman Reporter CSV tool? I am keen to enhance my understanding and competence in this regard and would greatly appreciate any guidance or suggestions you may offer.

The repo itself has a readme file containing the information on what is returned in the csv file.

There are a couple of other flags that can be used in the newman command do do things like export the file to a specific location or include the response bodies in the output.

Basic usage, once installed, would be something like:

newman run postman_collection.json -e postman_environment.json -r csv --reporter-csv-includeBody

I don’t own that reporter or use this so all the information is coming from the readme which is in the link I shared previously.

Hi @danny-dainton, I’m really grateful for the insights!
I haven’t tried it yet but I would just like to ask, Let say I have a sub-folders under a collection and each sub-folders contains different endpoints and methods (POST, GET, etc.). Will I be able to use the newman-reporter-csv package for that also?


Hey @andrea-ree,

As I previously mentioned, I don’t own that reporter or know the exact report that will be generated for your given context.

The best thing to do here, is to run the Collection with the reporter and take a look at the output. :pray: