DEV Community

Cover image for Tools for Automated API Testing. Our Experience
Alex K.
Alex K.

Posted on • Originally published at linkedin.com

Tools for Automated API Testing. Our Experience

In this post, I’m going to share my team’s practical experience of using the most popular tools for API testing and for building a complete and fully automated testing process. Postman, Katalon Studio or REST Assured: which one to choose?

Being great tools for automated API testing, they, however, still have certain drawbacks and merits. Let’s see when and in what situations they can best fit your testing expectations.

Postman for a quick start

Postman is the best variant when you only start mastering the API automation testing.

It requires a basic JavaScript knowledge for tests writing and provides a standard set of snippets you can adopt right away for your tests. Due to its speed, Postman can be also used as a backup tool for quick requests sending and response receiving.

Speaking about its pros and cons, we’ve singled out:

  • Short learning curve before starting automation testing.
  • User-friendly UI.
  • Constantly growing community.
  • Seamless operation across all desktop platforms.
  • Operation speed.
  • Additional opportunities to create a workspace, cloud storage, etc.
  • Tests launch from the command line.
  • An opportunity of traffic interception from mobile devices.

As for cons:

  • Postman works solely with JavaScript.
  • No opportunity to set up a fully-fledged automation process with files upload on a server.
  • No option to reuse prepared in advance request templates.
  • No chance to build up an intelligent project structure if the number of tests grows considerably.
  • No opportunity to run a robust debugging using breakpoints.

Comprehensive automation with Katalon Studio

Katalon Studio can be used for a fully-fledged automated API testing. Just keep in mind that it requires a basic Groovy or Java knowledge. It’s very convenient to write parameterized tests using this tool.

Although Katalon Studio is a comparatively new solution, its enhancement speed isn’t as fast as expected. Many improvements remain unimplemented after a long time.

Among the pros and cons, we’ve encountered using Katalon Studio, there are:

  • Longer learning curve compared to Postman. Katalon Studio requires a basic understanding of the automation process and experience of working with IDE.
  • Allows conducting full automation of API testing.
  • Tests can be written using Groovy, Java and the GUI builder.
  • An opportunity to write custom methods (keywords) with their further usage in tests.
  • One can easily work with different variables and profiles.
  • User-friendly parameterized tests.
  • Built-in report’s support and an email distribution system for reports.
  • Full-scale debug mode.

Among the cons, there are:

  • Operation speed.
  • No stable working version for Linux.
  • Periodic tests' crashes without any apparent reason.

Popular REST Assured

REST Assured is one of the most popular Java-libraries for automated REST API testing. With this library, you can write tests of various complexity thoroughly utilizing the advantages of Java or Groovy. This tool doesn’t have any limitations and, combined with different frameworks, it’s a must-have for an automation tester.

It is significant that using this library you can write any tests and perform any actions/manipulations with data during the testing process while tests themselves remain independent from the software you check.

Pros to know about:

  • There is a variety of canned solutions necessary for testing. You can use ready-made tools without connecting additional libraries.
  • It has extensive documentation on Github.
  • Combined with frameworks for testing and reports building, it becomes a powerful tool for API testing.
  • All tests are written in the form of code using Java or Groovy. You can easily make some changes, enhance the code’s quality or the tests’ quantity without the risk of breaking something.
  • It does not depend on the platform or the development environment.

Cons to keep in mind:

  • It has a medium learning curve and requires a basic knowledge of Java or Groovy, Maven as well as an experience of working with dependencies, command line and IDE.
  • Tests running speed depends on the code quality and time necessary for compilation.
  • There is no GUI as in the mentioned above tools.
  • You’ll have to connect and set up the additional tools for reports building yourself.
  • It is not the best option for a quick check of the general API working efficiency without delving into the tests writing.

Summing up

These three solutions can perfectly cope with the specific tasks in their own way. Sharing our practical background, I’d recommend combining REST Assured with JUnit 5, Hamcrest, Allure and Maven for automated API testing. For a quick request sending and response checking, Postman will be an ideal variant.

What would you say about it? Maybe you have your own experience to share?

Top comments (0)