|
Answer» Postman has the following VARIABLE scopes: - Global Variables: Global variables allow data access between different collections, requests, and scripts. They are available throughout the workspace.
- Environment Variables: These allow us to tailor the requests about different development environments - such as LOCAL testing, stage testing, or prod testing.
- Local Variables: These are temporary variables that are accessible only WITHIN the scope of requests scripts. They are either scoped to a single request or single collection, DEPENDING on the requirements. These variables are not available after the completion of the SCRIPT execution.
- Collection Variables: These variables are scoped to be available for all the requests present in a collection. They are independent of the environment.
- Data Variables: These variables come from external JSON or CSV files for defining the datasets required to run the collection in Collection Runner or Newman.
|