pm.environment.set called in Tests don’t persist data when called by Flows:
Details (like screenshots):
My collection has a bunch of endpoints that need to be called in sequence.
The first endpoint is a GET that returns a list or other endpoints.
For example, when I call /api/ I get my home URI:
I then use the HOME URI in the next call:
I used the Tests tab to store the values in an environment variable:
var data = JSON.parse(responseBody); pm.environment.set('home', data.home);
Until here, everything works fine
How I found the problem:
I then created Flows (which I understand is a Beta functionality) and I was expecting to connect the dots by linking Send Requests.
Although the values are fetched correctly and the SET function is called, the values don’t persist from one to the next Send Request.
I’ve already tried:
To change the environment variables to Global.
I think this is a bug.