OK so here’s my take. Postman in my opinion is not a “full fledged” automation tool. It is a fantastic tool, however, for quick API testing, setting up test scenarios in collections and doing limited amount of automation. When it comes to source control, updating tests and Newman integration, the process is quite tedious and cumbersome. It sure can work, however you need Postman app to develop tests, you cannot really do it in the code, editing
.postman_collection JSON file unless you’re a total nerd
Not to mention the huge debate on Postman forums about security and privacy. Allegedly dozens (hundreds?) of companies around the world are rethinking whether to ditch Postman completely and choose some other tool due to those concerns. Problem is, there’s not decent alternative to Postman, it’s like switching from Windows OS, for Christ sake
What I missed in most other comments is the fact that automation software should be as close as possible to production code. For example: your backend is in Java and UI is in React? Well, choose one of the two, whichever will be closer to your tests and/or who’s developers will more help in the automation effort. That way you can share snippets of code with developers, or even full features, components or libraries. Unless, of course, you’re Google and have a sea of SDET’s at your disposal in dedicated teams, doing just automation
Another fact to consider is: if you’re testing only the APIs, do you absolutely need a framework that is best utilised for UI testing? Perfect example is Cypress. Again, it’s a fantastic tool but if you only need it for API tests and UI will never come, it might be too big of an effort for your project’s needs. That is of course just my personal opinion.
I am in a similar situation, I need to choose automation framework as best as I can. We have only APIs, zero UI. Our code is
TypeScript/NestJS and devs use
Jest for unit tests so naturally, I chose TypeScript with
supertest. I might change my mind in near future, however, depending mostly on client’s needs. For example, I miss some out-of-the-box test runners and reporters like Selenium, Cypress or Playwright have, but I’m not there yet.
What I’m trying to say is (TLDR): choose the right tool for the job, not what you feel most comfortable with. I know it’s a tough one but that’s the only proper way.
Last but not least, and forgive me for being blunt, I am a bit taken aback by the title itself - “Postman or Playwright for API tests”. It’s like giving us the answer together with the questions and that’s certainly not a good QA best practice. There’s myriad of different tools. Yes, your options might be Postman or Playwright, but that’s a specific use case