Running Tests Locally with Newman

Now that we have some API tests built with Postman, it’s time to move from the Postman UI to a command-line interface. While the UI is nice, you’ll find the CLI will let you run the tests from simple scripts, launch them very quickly, and make it easier to incorporate test runs into your regular development habits.

To run Postman tests locally on your own machine, you can use a CLI utility called newman. (See Newman, for details on how to check for and install this utility.) newman is a tool created by the Postman team. It supports running test collections directly from the command line and outputting the results for viewing or storage within your project. Once you have newman installed, you’ll need to pull ...

Get Design and Build Great Web APIs now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.