Using Postman collections in your CI – Another Option
Our esteemed community member and my friend Jakob wrote a great blog series about using Postman. The trigger for this blog lies in the last blog of the series. Before you go any further I would recommend you to go through the knowledgeable series. In the last blog of series, Jakob talks about using the NPM package newman to run all the collections at one go. It gives a lot of control and flexibility. I was exploring postman after reading the blog series and found one more way to test the collections, so thought of sharing this alternative also.
Another alternative – Runner
First I created a collection with two sites to test both are making a get call to google.com as shown below.
If you look at top left corner you will see a button Runner
Click on it the next screen opens with title Collection Runner, this whole screen is kind of dashboard for all the test runs.
You can choose your collection, enter the number of iteration,delay if any between request and click on start run. It will run all the collections as was done in the blog series. On right hand side you can see the results.
Apart from this it also provide statistics also like detail of the run results etc. You can export also the test collection results.
What actually it is doing in the backend?
I casually clicked on run in command line option on the top right to explore what it is.
It is nothing but newman? as used in the blog series. So this runner is nothing but the frontend for the same npm module. Of course CLI will provide more granular control and craziness?
Nice one. You can also just press run in the collection which I believe I covered in the first blog. But there is a whole other segment around mock requests and monitoring that I haven't covered. I thought that was more natively for postman and something interested parties could cover themselves. Maybe that should be another blog. ?
You are right i missed that part we can do run also from collection main screen also?, good tip. Yes Mock request and monitoring is pending so when are you planning to publish?
Hehe I hadn't planned to do that. You are more than welcome to do that. I want to write about selenium testing next.