Newman

What is Newman?

It is a postman runner which will be used along with the postman collection. It’s a command-line collection runner for Postman.  It allows you to effortlessly run and test a Postman collection directly from the command-line. It is built with extensibility in mind so that you can easily integrate it with your continuous integration servers and build systems.

Checking Newman Installtion

 To make sure that your machine has got the newman , run the following command in the command prompt under the folder npm– node package manager as follow

Figure 1.1 Checking Newman Version

if the Newman is not installed , in the machine. Please follow the following steps

Installation of Newman

To run Newman, ensure that you have Node.js Install Node.js via package manager. The easiest way to install Newman is using NPM. If you have Node.js installed, it is most likely that you have NPM installed as well

$ npm install -g newman

$ brew install newman

There are other options to install Newman , and the detail of the installation procedure will be available in the following line as Newman Installation

Running Collection

Running a postman collection can be made. using a syntax newman run collection_name.json. The application how to execute a collection as follow

Figure 1.2 – Running Collection Using Newman

Running Collection With Environment

The environment is one of the element in the collection execution. It helps to organize variables and values. some of the common variables for environment are baseURL, version, some parameters and other details which could be common for more than one folders and sub-folder in a collection.

Figure 1.3 – Running Collection With Environment

Report Packages -html

There are various report package that could let us to generate a report after the execution of the collection. The report package will be presented in Json, html. The report of html will be presented using a template that could let us to customize the content or use a default html format.

Figure 1.4- Running Collection Including a Report package – html

Report Package -Json

A Json is one form of generating a report at the end of the collection execution through a postman The reporter generate a report in the form of Json. The application will be as follow

Figure 1.5- Running Collection Including a Report package – Json

Scroll to Top