Closed Justus-at-Tazama closed 3 months ago
Regression testing on ArangoDB Setup collection:
Confirmed there are no instances of pm.environment.get()
in non-legacy tests that are attempting to retrieve a variable that is not in the environment file.
…les instead of environment variables.
Postman contains two kinds of variables: there are environment variables and global variables. When you click the little icon in the top right in Postman, you'll get to see both of them. As a rule, the environment variables are just that - variables that define the parameters for running the Postman tests in our environment. These variables should be static/persistent between tests.
The global variables are the ones that should be used when you are stashing values between tests. For example, if you want to set up the address to the API, it's an environment variable. If you want to remember an ID from one test to use as input into another test, it's a global. No Postman test (prerequest script or test) should ever use the
pm.environment.set("key", "value")
method.The purpose of this change is to refactor our existing Postman tests to use
pm.globals.set()
instead ofpm.environment.set()
.Acceptance criteria
rule-tests
repository