How to export/download Response Body into an external file from Collection Runner Results?



Is this possible ?


This from @sivcan might be able to help with this?

1 Like

Thanks ! I tried but only the last response is exported. Not the ones from the previous iterations. Weird… Any idea ?


@sivcan would be able to help with this but probably not until he’s back online :grin:

I think, if I remember, you might need to modify the server code to append the response rather than just write over the previous response.

1 Like

The script uses the request name in Postman as the filename for the export. It sounds like you’re iterating over the same request.

As Danny said, you’ll need to edit script.js to check for an existing file, and if so append the response.

Alternatively, if you want each response in a separate file, edit the Test script at the collection level so that the request name will be unique each time: you could append a timestamp for example +

1 Like

Nice ! Got it working ! Thanks to you both !


Great! Which route did you go down in the end?