How to save String from json response to excel or csv file?

Hello Everyone Here,

I am facing an issue related to saving String value from response body directly to csv file, actually I don’t know how to write a specific value from response body to csv/excel directly.

My test script reads values from csv file and then compare with values in response body. Now I want to save some required string/int/any format values from response body and save directly in the same csv file/or in another sheet of same file.

I can save required info into global/environmental variable and then export it but issue is same script will execute multiple time for different data as per iteration. lets say same script run three time, variable will have result of last iteration but I want to save required string of each iteration either in variable or csv file.

I found this but it doesn’t help me

Any help or guidelines highly appreciated.

Thanks in advance

You can’t just write to a CSV file from Postman.

The only approach would be using Node.js and Newman, with something like this:

1 Like

Thank you @vdespa.

Is there a way to change ‘iteration 1, iteration 2 …’ into some meaningful name ? iterationNameChange

or May be to change request Name. like

with regards to saving string from Json respsone, Pls share the Json response
If you want to save your test suite in csv you need node.js as told by vdespa

Saving your reporte in csv (this may help)

Let me know what your need is.

You can go to Left panel in collection> Go to request> right Click and select Rename. This will solve your purpose