Newman is a command-line Collection Runner for Postman. We can use newman to run postman collection tests through cli, which a step forward to add our tests to our CI.
Let’s first install the newman:
1 |
npm install -g newman |
Now we can export our collection:
Select v2.1
and save it
Now its the time to run it
1 |
newman run Tutorial.postman_collection.json |
And notice the test has ran and pass: