API testing using postman - Newman Basics - [Part - 9]

in #api6 years ago


Newman - In simple words - Run postman collection commandline and exports results in different formats(html,json,xml etc) and number of times.
It’s created to keep CI in mind( Continous integration).

Build on node js.

Make sure(Node is installed).

Available for the Linux, windows and Mac

In this tutorial, we are building API test suite in Postman and Running it Command Line(Newman).

API calls Collection include mainly three things:

HTTP headers
HTTP Request (POST,GET,PUT,DELETE )
Status Code/ Response Code

Status Code/Response Code - There are many status/response code, from them we can verify the response.
200 - OK, The request was successful.
201 - Created, The request was successful and data was created.
204 - No Content, The response is empty.
400 - Bad Request, The request could not be understood or was missing required parameters.
401 – Unauthorized, Authentication failed or user does not have permissions for the requested operation.
403 - Forbidden, Access denied.
404 - Not Found, Data was not found.
405 - Method Not Allowed, Requested method is not supported for the specified resource.
500 - Internal Server Error.
503 - Service Unavailable, The service is temporary unavailable.

Link: jsonplaceholder.typicode.com/posts

Download: http://getpostman.com

API TESTING is 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.

Steps to set environment variable.

Click on Manage Environment.
Click on ADD
Write down the Name of Environment.
Fill key & value, You can pass key = variable and value is your host IP address.


▶️ DTube
▶️ IPFS

Coin Marketplace

STEEM 0.27
TRX 0.11
JST 0.030
BTC 69081.21
ETH 3809.03
USDT 1.00
SBD 3.50