Reseting current values to initial values through sendRequest within a Monitor execution

Payton
Fri, 03 Feb 2023 16:33:13 +0000
Help Hub

Within a Postman Monitor, is there a valid way to set an environment’s current values to its initial values through pm.sendRequest() or any other method in the pre-request script or test script?

I found that the approach I was taking only updated the initial value, so subsequent requests didnt actually obtain any updated environment variable values.

I’ve tried all the pm.environment.set() and pm.iteratedData.set() etc. functions but have had no luck as those apparently do not function within a monitor’s scope. Anyone have an idea?

2 posts - 2 participants