Migrating API tests from Postman

If you have a lot of Postman collections and want to convert them to developer-friendly test-automation scripts, read on, you have come to the right place!

Postman is great for exploring APIs and saving requests for re-use or sharing with other team members. It is widely used because you can do this without writing code.

But when it comes to deep testing of your architecture and platform services, you need parallel execution, powerful assertions, simulating end-user-workflows and collaboration via Git. Today, developers are expected to own quality right from unit-testing, all the way to end-to-end testing, deployment and even monitoring. API testing has to be accessible to not just testers, but developers have to be able to edit and run tests as part of the “Inner Dev Loop”.

This has prompted many teams to explore options for comprehensive testing of application and business-logic via APIs. Many enterprise teams have also realized that moving UI tests to API tests is a wise choice. With the right tooling, API tests also turn out to be easier to write and maintain, and as readable as BDD-based approaches.

This is what Klaus Häuptle at SAP has to say on “Alternatives to Postman for Exploratory and Automated API Testing”:

“While GUI based tools like Postman or Insomnia have their advantages, they also have some limitations when it comes to automated API system testing. Automated API system testing is the process of running a set of test cases repeatedly and automatically to verify the functionality, performance, and security of the APIs. This process is essential for ensuring the quality and reliability of the software.”

Klaus goes on to provide details on the advantages teams in his organization saw after moving to low-code based API automation approaches. For example:

“The common approach to store collections externally in the cloud can be incompliant with company policies. On the other hand, sharing code instead in an repository is transparent and compliant.”

Klaus finally provides recommendations on tools to choose, including Karate.

Karate integrates into your IDE of choice, be it Visual Studio Code or IntelliJ. The official Karate plugins provide a premium feature where you can import a Postman collection and convert it along with any JavaScript based assertions, into working Karate API test scripts.

Get started from here. Happy testing!