1

I wonder if it is 100% necessary to use an automation framework like KARATE instead of API Tools like POSTMAN.

Usually I automate different websites by using SELENIUM & JAVA and I try different API REST using POSTMAN (that's all). I always did / try something like Rest-Assured, Postman, HTTPClient in order to automate API test cases.

  1. When would you use KARATE?

  2. When would you use POSTMAN?

  3. When can we use both of them?

I don't really know the differences. I want to automate the API tests and run them through CI/CD pipeline jobs.

1 Answer 1

2

When would you use KARATE?

Karate Framework is an open-source Behavior Driven Development (BDD) testing framework for API test automation, performance testing, and UI testing. It can script calls to HTTP end-points and assert that the JSON or XML responses are as expected.

When would you use POSTMAN?

Postman is an API client that makes it easy for developers to create, share, test and document APIs. With this open-source solution, users can create and save simple and complex HTTP/s requests, as well as read their responses.

When can we use both of them?

Always. It is different tools, check details above.

  1. Postman is a great tool when trying to dissect RESTful APIs made by others or test ones you have made yourself.
  2. Karate Framework is an open-source Behavior Driven Development (BDD) testing framework for API test automation, performance testing, and UI testing.

Karate is built on top of Cucumber, another BDD testing framework, and shares some of the same concepts. One of these is the use of a Gherkin file, which describes the tested feature. However, unlike Cucumber, tests aren't written in Java and are fully described in the Gherkin file.

Both tools can be integrated into CI/CD pipelines.

  1. Continuous integration and continuous delivery (CI/CD) are a core part of the API development workflow. Postman integrates with popular CI tools so you can view details about API builds in the same place where you define and test your API.

  2. KARATE test framework pipelines has standard Java / Maven project structure, and seamless integration into CI / CD pipelines - and support for JUnit 5.

Both tools can be used for API test automation, performance testing.

  1. KATATE also has UI testing. It is Java based tool.

  2. Postman is JavaScript based tool.

It depends on your project needs.

You can use any of them or use only one of them.

Use cases for Postman:

  1. you are common with JavaScript.
  2. you are developer and want to create, share, test and document APIs.
  3. you want to create and save simple and complex HTTP/s requests, as well as read their responses.
  4. you want to do some light load testing.
  5. you are not common with programming too much.

Use cases for KARATE:

  1. you are common with Java and Java ecosystem (Maven, TestNG, JUnit).
  2. you can use this framework even if you are common or not with programming.
  3. you want to do some API test automation.
  4. you want to do some performance testing.
  5. you want to do some UI testing.
  6. this framework will be good for you if you are common with Selenium WebDriver test automation approach.
2
  • 1
    Thank you very very much for replying! :). Could you please tell me when would you use KARATE instead of POSTMAN and the opposite? Commented Dec 26, 2022 at 20:36
  • @new_programmer sure! I've updated my answer with details about use cases. Commented Dec 26, 2022 at 22:05

Not the answer you're looking for? Browse other questions tagged or ask your own question.