1

I know I can add a Pre-request Script for a collection or for a specific request. I want to know if there is a way to do such a thing for a whole runner. I need it since I want to do pm.collectionVariables.unset("myVar") just once before my runner run, and not in each iteration.

Tom Carmi
  • 385
  • 1
  • 5
  • 18

1 Answers1

1

There isn't a native pre-runner script for Postman collection/folder runs. There might be a few options here.

My solution would be to just have your first request be a GET to Postman Echo that you can name runner initializer. The only goal of that request would be to do setup clean up. If you don't have network access to Postman echo, I would try to use something similar internally that just works as an automatic response.

I created a sample folder to illustrate the point.

enter image description here

bitoiu
  • 6,893
  • 5
  • 38
  • 60