Post Collection Run hook

I’m running a Postman collection as an API test suite to verify that a certain REST service operates as expected.
The idea is that after every “collection run” a POST request should be sent to a certain URL with the full test report attached.
How can that be achieved?

Hello @antonfenske, welcome to the community! :wave:

I can think of two ways right now with which you can achieve this:

  1. You put a new request at the end of the collection which makes the POST Request along with the full test report.
  2. In the Test script of the last request of your collection, you can put pm.sendRequest there and make the POST request call.

Sounds reasonable. However, what’s the best way to fetch the test report to be able to send it from inside Postman?

What format is your test report in?
Is it JSON data? or something like that?

The report is in JSON.