Okay, so today I decided to mess around with Newman and see what it could do. I’d heard about it for running Postman collections from the command line, but never actually tried it. I figured, “Why not give ‘newmans indiapolis’ a shot?” – even though I wasn’t totally sure what that meant at first, maybe some kind of test for Indianapolis-related APIs? LOL. Whatever it was, I was game.
Getting Started
First things first, I needed to install Newman. I already had * and npm on my machine, so it was a simple:
npm install -g newman
That was easy enough. I hit enter and boom, installed!.
My First Run
Then I needed a Postman collection. Fortunatelly, I had some old collections from learning Postman, then I exported them to my work folder. Next I just try to run the most simple way.
newman run *
I replaced “*” with the actual name of my collection file. Pressed enter, and… stuff started happening! It showed me all the requests in my collection, whether they passed or failed, response times, everything. Pretty neat!
Playing with Reporters
I wanted to see what else Newman could do. I found it, they called “reporters”. It can show the run in different * I tried the HTML reporter:
newman run * -r html
This created a fancy HTML report in a new folder called `newman`. I opened it up in my browser, and wow, it looked super professional! It had all the details, nicely formatted, with charts and everything. This would be great for sharing results with a team, or even just for my own records.
Trying “newmans indiapolis” (Kinda)
Okay, back to that weird “newmans indiapolis” idea. I didn’t have any specific Indianapolis APIs to test. But the name made me to try to organize my collections. So, I decided to create a new Postman collection with some public APIs, maybe some weather data or something and name it related to the city. I could then run Newman on that collection, so I’d kind of be fulfilling the “newmans indiapolis” concept in spirit, right?
I found a simple open weather API, added a few requests to get the forecast for, you guessed it, Indianapolis. Then I exported that collection as “*” and ran:
newman run * -r html
And there it was! My “newmans indiapolis” experiment, in a way. A nice HTML report showing the weather forecast for Indy, all thanks to Newman.
What I Learned
Newman is super easy to install and use.
Running Postman collections from the command line is awesome for automation.
The HTML reporter is fantastic for creating presentable reports.
Even a silly phrase like “newmans indiapolis” can inspire some API testing fun!
Overall, it was a cool day of exploring. I definitely see how Newman could be a powerful tool in my workflow, especially for integrating API testing into, like, a build process or something. I’m going to look it up how to setup with Jenkins later. Gonna keep playing around with this!