If you’re a software tester, you know that buggy software is a programmer’s worst nightmare. This is why testing is such an important part of any software development process. If you haven’t heard of Postman, here is some information that throws light into introducing Postman and its application levels.

Postman is a Google Chrome app which we mostly use to quickly test APIs to see the result returned by them. It presents you a constructing requests and reading responses with a friendly GUI.

What is postman rest client?

Postman is a powerful HTTP client for testing web services. Postman makes it easy to test, develop and document APIs by allowing users to quickly put together both simple and complex HTTP requests.

What do you mean by API testing?

It’s a type of software testing that involves testing application programming interfaces (APIs) directly and as part of integration testing to determine if they meet expectations for functionality, reliability, performance, and security.

Why do I need automation on API and what is it anyway?

Create your first Simple Test

First thing this is a simple controller in your app where you can fetch a unique post with is ID as params.

Now time to open Postman. In your left, you gonna see 1

a little folder with a plus sign. If you click there you can now create a collection.

2

Give a little name for your collection. For me, I’m using Postman-Tuto. With that collection, we make our life much easier to test route already create.

Add the route and the GET method in the main area. For me, I add http://localhost:3000/api/v1/posts/588ce46 because I have already created a fake post.

3

Now when I click send I receive this.

4

Perfect the route is working and the controller + model do their job.

Write your first Postman test

If you click on Test right below the URL container you gonna see this

5

Now time to write some test. First thing in the right you can see a select menu with test already create by Postman. We can select one already Statuscode: Code is 200.

6

If you click send now we can see the test pass 1/1.

7

Now add the Response body: JSON value check again in your right snippets.

Add this line and now click send.

This is the result.

8Add more test

Now an example of a complete test for this routes.

9Time to save and add new one

Now in the top left, you can see a big Save button. Click on the arrow and save as. Give a name to this route.

10

+ you need to add it to your collection.

The runner

In the top left you can see the button Runner if you click it Postman open a new window. Select your collection in the dropdown.

11

If you click Start Run you can get this.

12

Summing it up

Postman — it’s a wonderfully powerful tool and can help API developers ensure consistency and efficiency! And  It’s a useful tool for both automated and manual testing process. Hope you like this little tutorial and learn something new today.  

Happy Testing!

Talk to our Web Development Professionals

Post By : Hebin Jose C (2 Posts)

"Hebin Jose C is QA engineer at cubet techno labs. He has good knowledge in manual, Automation testing tools(QTP,selenium IDE,RC) testing of web applications."


You might also like...

INDIA OFFICE

info@cubettech.com
+91 484 4054324
Skype : cubettech
Carnival infopark,
Unit IX-C, 9th floor PhaseIV,
Kochi, Kerala, India

LONDON OFFICE

info@cubettech.com
+44 2071938618
Skype : cubettech
Kemp House
160 City Road
London- EC1V2NX, UK.
Top