Refresh assertions doesn't get a global variable

The variable was retrieved correctly the first time the test ran with the request sent. However, when I refresh assertions after editing the tests, the test result was “assertion error” because the global variable used was returned as undefined.

Hi @yasmimmartins !

It’s a little hard to answer this without more context.

How are you setting this global variable? If you’re encountering an issue with a global variable returning as undefined after editing the tests, this could be because the variables in Postman are not automatically updated when you re-run the tests without sending a new request. If you make changes to your tests or variables, you need to send the request again to ensure the tests run with the updated variables.

To resolve the issue, please try sending the request again after editing the tests or variables.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.