Day3 - API - Variables, Console and Runner
Day3 - API - Variables, Console and Runner
We can check the APIs working behind the website using the ‘Network’ tab.
With the help of Network calls we can verify which API is failing if any defect is found.
1. Inspect webpage
2. Goto Network tab
3. Refresh the page.
4. We will get all the Network call or API working behind the website.
Postman variables:
Variables are used to store a value which can be use wherever it require.
In all the API, whatever common feature/value is present we can save that value in variable and call
it as per need.
Domain is a common thing in all the APIs present in a single website/project, so we can add this
domain value into variable.
1. Collection level
2. Environment level
3. Global level
Environment level variables has highest priority, that means if we have created a variable at all the
places with same name then the APIs will call that variable from Environment.
We can create a variable at Environment level and the scope of that variable will be till all the
collections.
Similarly we can create variable at global level, just below the environment variables.
How to call a variable/how to use a variable:
To call a variable in APIs we can use ‘{{ variable_name }}’ this format.
It will show, what is the value of that variable and from where it is coming.
Postman Console:
Postman Runner:
With the help of ‘Runner’ we can run multiple APIs, multiple times at once.