Needed to change the environment variables values in between executing the test scripts

I need to cover the aspects of changing the environment variable values in between executing the test scripts.

Can you clarify what you mean by this?

Are you trying to change the environment Variables?

Are you wanting to change the value of the variable based on the number of times you have run the api call/script?

My aim is to change the value for number of times based on the api call/script.
I wanted the final changed value to be accessed from anywhere in collections.
So i thought of using environment variable.If someother approach help me out.

My aim is to change the value for number of times based on the api call/script.

Are you wanting to use this value of “number of times” in the postman runner? Are you wanting to make a certain API call a certain “number of times” during the run, or are you wanting to use this “number of times” in a for loop in the scripts section of the application. Any information about how you are going to be using this variable would be helpful in giving you better direction.

I wanted the final changed value to be accessed from anywhere in collections.

This would led itself very readily to being an environmental variable.

So i thought of using environment variable.If someother approach help me out.

Environmental Variables are very helpful in storing information across tests. Until I know more about how you intend to use this value I am not sure I can provide any other options.

Apologies for messing up , My scenario is like , I want to keep a variable where value will be assigned in runtime of testcase execution. These values will be varying in course of executing the testcase. I want to use the last existing value.

So I thought of using environment variable. but I want to know how to change the value of environment variable during running testscripts.