Using Newman

Updated on 28 Dec 2018

Basic Example

The first step is to export your collection.

We can then use that collection as a parameter for commandline

newman run test1.postman_collection.json 

It will run thru every request that you have in the collection and execute any of the tests that might be there.

At the end of the feed, there is a nice summary.

Options

There are command line options available. These are very useful if you need the output in a format that Jenkins will understand.

  • -r report
  • –report-junit-export /dir/file where the export will be written

Info: this is the type of command I might use with Jenkins

newman run $WORKSPACE/postman/test1.postman_collection.json -r junit --reporter-junit-export $WORKSPACE/postman/mama_test.xml