Newman is a command line Collection Runner for Postman. It allows you to 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.
Let's get started.
Step 1: Install Node.js
Newman is built on Node.js. To run Newman, make sure you have Node.js installed.
You can download and install Node.js on Linux, Windows, and Mac OSX.
Step 2: Install Newman from Command Promt
Once Node.js is installed, command promt opens. Enter the following command to install Newman.
npm install -g newman
Step 3: Run a collection from Newman
Once newman is installed, we can run our collections from command prompt. To run a collection, we need to export the collection as a json file from postman.
Once the collection.json is exported, then set the path of the json file in command prompt and enter the following command to run the collection.
newman run Collection_Name.json
You can see the requests under the collection are executed.
Thus you have executed your collection using Newman.
Comments