Newman is a command line collection runner for Postman. It allows you to run and test a Postman collection directly from the command line. You can easily integrate it with your continuous integration servers and build systems.
Newman is built on Node.js. To run Newman, make sure you have Node.js installed. To install, just run this command in your terminal:
npm install -g newman
The easiest way to run Newman is to run it with a collection. You can run any collection file from your file system.
newman run somecollection.json
Newman, by default, exits with a status code of 0 if everything runs well, such as without any exceptions.
Continuous integration tools respond to these exit codes and correspondingly pass or fail a build.
You can also pass a collection as a URL by sharing it. Example:
newman run https://www.getpostman.com/collections/7de09082f9b11aa296d3