DEV Community

Suganya Muthukumar
Suganya Muthukumar

Posted on • Updated on

Postman For Beginners - Part 1

As a developer, I always wished if there could be any tool which would identify the silly human errors we make. Given the monotonous way of work it is not always possible for a developer to find all the dependency conflicts, which could break some other while we are keen on developing the new things. At least the foremost thing I would expect is not to break anything.

In my quest to identify tools, which could make my job easier, few features provided by Postman, I felt it handy.
This is post is purely for beginners who would like to explore more of its useful features.

A general use case to a developer is to check the functionality in different environments like Prod, Test etc. Rather than changing the context each time how about switching the context in just a click?

Let me walk through the steps to set up the below API for different environments.
Environment1 url:
http://dummy.restapiexample.com/api/v1/employees
Environment2 url:
http://dummy2.restapiexample.com/api/v1/employees

1. Set up the environment and customize the variables

Select ‘Manage environment’ and click on Add.

Alt Text

Set up the variables for different environments
Environemnt 1:

Alt Text

Environment 2:

Alt Text

Note:
1.Use the same variable names across all the environments.
2.In any case if you have to update the values make sure the correct value is updated in the ‘Current Value’ text box as well.

Now that your environments are set, we are Ready to Test!!

2.Ready to Run

Choose the proper environment from the environment list and use the placeholders to define the context.

Alt Text

Alt Text

You can now see the API response for different contexts.

Happy Sharing !!

Top comments (1)

Collapse
 
preetampc profile image
preetam-pc

Great article for beginners