DEV Community

Cover image for Using Postman's CLI tool for API testing: newman

Using Postman's CLI tool for API testing: newman

Chris Williams on October 13, 2019

Image by Steve Buissinne from Pixabay I need a tool to handle post-deployment testing properly I've got a project where I'm not handing...
Collapse
 
dannydainton profile image
Danny Dainton

Thanks for the shout out, I very rarely create content on here but I live the site. ❀️

I see from your images that you're using an old version of the app.

Version 7 includes a new API tab (next to the Collections tab) that will allow you to import you OpenAPI spec and auto generate a Collection from these.

Collapse
 
scampiuk profile image
Chris Williams

That's something I'll take a look into! We work with the OpenAPI spec to do much of our Dev work, so it's the single-source-of-truth: I'll look if we can use some cli or API way of importing and maintaining the collection from that πŸ‘

Collapse
 
scampiuk profile image
Chris Williams

Ahh so the Ubuntu snap is still installing 6.7.5 as the latest

Collapse
 
dannydainton profile image
Danny Dainton

Yeah, there's an open issue around that, you could do this instead to get the 7.8.0 version:

sudo snap switch --channel=candidate postman

sudo snap refresh postman

Collapse
 
jaedle profile image
jaedle

This is a very cool idea, I will have a handson! 😊

Even though it’s an example:
If the client misses a required field, please respond with a client error (4XX) and not with a server error (5XX). There is nothing the server/service could do (heal, scale, reboot) to make that request pass.

Collapse
 
scampiuk profile image
Chris Williams

Mortified! I'll fix this now!

You're also the only person to mention this in a few thousand people reading it πŸ˜€

Collapse
 
mytestingithub profile image
mytestingithub

I use this my day to day work it's been two years since I have started this.

I would like to see more on how do you save response in Jenkins or any particular string write back to Jenkins if it fail or even if it's not falied

Collapse
 
alirezamgh profile image
alireza

Great Article, Thank you Chris

Collapse
 
harishshet222 profile image
Harish shet

Hi, I want to hide the iterations , only the final table should gets displayed at the end of the execution, can you help me on this which cli parameters I have to add for this? Thanks