Environments
I have already mentioned environments, and now we are going to take a closer look at them. Environments are an invaluable tool when testing. For example, all our URLs are now targeting localhost, but when we are going to run our API on a server (test, production, whatever), we probably want to run our tests on that server, too. Manually changing all URLs is not really an option, especially when you have lots of tests. This is where environments come in. An environment is basically a set of variables like global variables, except environments can be easily interchanged, while global variables cannot. You can manage your environment by clicking the gear button in the top right corner of Postman and clicking the Manage environments ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access