I have an env variable that gets generated after initial requests.
1 - I get a value from a ‘Request 1’ [value is different every time]
2 - I set the ‘Request 1’ Value in TESTS to Env variable [e.g variable key and value is xxx and it stores in Current Value]
3 - I use the ‘key’ variable in ‘Request 2’ and so on
now when I run this in Newman via exporting envr.json, it won’t be working since my initial value (KEY) is not there. Thus I used ‘API-Key’ to hit my Env variables values.
The issue is that Newman accepts the ‘INITIAL VALUE’ whereas my Tests are setting the variables in ‘Current Values’
How can I assign the Dynamic Current Values to ‘Initial Values’ at the time I set the env variable in TESTS, so I could use those Values through Newman?
my Newman command is:
newman run https://api.getpostman.com/collections/collectionUId?apikey= 1234 --environment https://api.getpostman.com/environments/environmentUId?apikey=1234