Reset All Environment Variables in Postman Prerequest Script

I want to “Reset All” environment variables before running a test. By Reset All, I mean reset them back to their original state and not unset them - so like you would if you were in the environment menu and clicked “Reset All”. Can’t seem to figure out how to do this, but it seems like a pretty necessary clean up practice?

Hi @dylan-neal
I’d probably do it slightly differently.
Instead of ‘at the end, reset’ I would ‘At the beginning, setup’
And set all my expected variables with
pm.environment.set(variableName:String, variableValue:*)
In a pre-req script at the start of the test.
Each test run automatically sets the correct variables then.

Just found this example someone has built.

Hope it helps :upside_down_face: