Collection Runner- How we can save response in local computer for documentation

I agree with @odanylewycz. To make this easy, you can add a test script on your collection so it automatically runs for every request.

let responses = pm.collectionVariables.has('collectionResponses') ? pm.collectionVariables.get('collectionResponses') : [];

responses.push(pm.response.json());

pm.collectionVariables.set('collectionResponses', JSON.stringify(responses));

When the collection is has completed, you will have every response from every request in that collection run in the collectionResponses collection variable.

2 Likes