I’m experiencing the issue on the desktop windows application(3 or more last version of postman app). The issue can’t be reproduced in the browser client
I can’t set or update the environment value. I trigger the request and env. value is still the same after a successful response. In the console, I can display the value form the response body. Seems all works fine but not with the env values in order to update that values.
Can you paste the code snippet and example response and not an image please?
Also, why do you have the pm.environment.set() statement at the top?
Is this script in any other part of the request? Are there any unsaved changes (I can’t see the list of open tabs in the image)? Are you running these individually or part of the Collection Runner?
it is a single run. In my image, you can see the request body and the response. All changes have been saved.
Where should I put this statement? do you want to suggest placing it at the bottom? (nothing different if I do like this)
New steps: I closed all the tabs, and deleted a context token variable from env. then I run the request. and I got the contextToken with the expected value. but only when I do it manually. If I do run folder. The contextToken value has null as a value which leads to failed test results for those requests where I re-use contextToken parameter