How to run requests in command line (Newman) in Postman

Hirudini Udugama
2 min readFeb 13, 2022

Steps:

  1. Install node.js

First we should check if node.js is already installed. For this open the command prompt in windows and type node -v and click on enter. If any version is not displayed that means node.js is not installed. Type npm -v to check the version of the node package manager version.

If node.js is not installed we can install https://nodejs.org/en/download/ matching with the operating system.

2. Install Newman

Now let’s install newman. For this just type npm install -g newman in the command line and hit enter.

3. Export collection as a JSON file

To export collection postman we can click on more option of the collection -> Export

Then select the recommended version and click on the export button. Let me export it as Collection1.json

4. Run command

Now on the command line go to the location of Collection1.json. Then type newman run Collection1.json and hit enter button.

--

--