Is it possible to get All Response Body output when using Collection Runner?

I have very little programming experience, but find the tool extremely useful.
Is it possible to get All Response Body output when using Collection Runner without opening each individual Iteration?
I’d be willing to use Newman, but not sure if the Response can be output to a file if scripted?

Hi @njdeluca

Welcome to the community.

The below documentation should help you to save the response body output.

I feel silly asking this (total noob here) -

Can someone help me with these steps - walk me through these tasks?

  1. Clone the following repository to your machine - https://github.com/sivcan/ResponseToFile-Postman or use the following command - git clone https://github.com/sivcan/ResponseToFile-Postman
  2. Navigate into the directory and install the dependencies. Use the following command: npm i
  3. Run the local server. Use the following command: node script.js
  4. Now, the responses for every request which is a part of this collection will be written to the Responses folder inside the project repo. You can modify the local server’s code to change the file location.

Thanks!

Hey @lmurray, welcome to the community :wave:

These steps involve pulling down source code via git and building/running it.

It’s probably going to be a bit rough if you’ve never done any programming before, but you can start by installing these prerequisites:

  1. VS Code
  2. Git
  3. Node

Start with that, then we can continue.

Thanks @allen.helton.

Was able to get the three apps installed on my machine.

I do have a basic knowledge of programming but I’m not super familiar with these applications, per se.

Now that I have these installed, any instructions you can provide towards next steps?

As an aside, I am able to see the new collections in the Postman interface.

Thanks again. I’m committed to making this work!

Also -

I was able to complete these steps:

1. Clone the following repository to your machine - https://github.com/sivcan/ResponseToFile-Postman or use the following command - git clone https://github.com/sivcan/ResponseToFile-Postman
2. Navigate into the directory and install the dependencies. Use the following command: npm i

But got stuck at:

  • Run the local server. Use the following command: node script.js*

Nice work so far!

The step you’re stuck on is an easy fix.

node script.js

node is a command to run a javascript file. Specifically with this command we want to run script.js

So in VS Code, you want to open a terminal - which you should already have open because you were able to do npm i. and just type in node script.js and hit enter.

A point to note, you should make sure that the directory you’re in contains script.js otherwise it won’t work.

Thanks for the response. I ran these commands from the packaged Mac terminAL, NOT VS. IS THAT OK?

On second look, npm i may not have worked.

This is what it threw:
MacBook-Air-2:~ lmurray$ npm i

npm WARN saveError ENOENT: no such file or directory, open ‘/Users/lmurray/package.json’

npm notice created a lockfile as package-lock.json. You should commit this file.

npm WARN enoent ENOENT: no such file or directory, open ‘/Users/lmurray/package.json’

npm WARN lmurray No description

npm WARN lmurray No repository field.

npm WARN lmurray No README data

npm WARN lmurray No license field.

up to date in 0.396s

found 0 vulnerabilities

you have to make sure the terminal directory is pointed at the root of the git repository you cloned. So just run the command:

cd path/to/git/repo/root

Then you will be able to run an npm install and node script.js

Allen,

Success! (I think?). TYVM!!!

MacBook-Air-2:ResponseToFile-Postman lmurray$ npm i

npm WARN node-server@1.0.0 No repository field.

added 70 packages from 55 contributors and audited 70 packages in 2.56s

found 0 vulnerabilities

MacBook-Air-2:ResponseToFile-Postman lmurray$ node script.js

ResponsesToFile App is listening now! Send them requests my way!

Data is being stored at location: /Users/lmurray/ResponseToFile-Postman/Responses/

1 Like

Looks like it! Nice work @lmurray! :clap: :clap: