5 top open-source API testing tools: How to choose

As more companies make the shift left toward DevOps, continuous integration (CI), and continuous deployment (CD), test feedback needs to be quicker than ever. Focusing solely on UI automation, which is notoriously slow, can kill your test automation efforts. 

As you scramble to make sure applications are ready to ship, API testing should be part of your overall automation strategy

There are lots of tools available for API testing, but how do you choose?

The following are the top five API testing tools I believe can help you, with descriptions that might guide you in choosing one over the other—though they're all great options. 

Continuous testing defined: Understand the basics and what it means to DevOps teams

REST-Assured

When using Java, REST-Assured is my first choice for API automation. In fact, it's the main tool I use for API testing.

REST-Assured is a fluent Java library you can use to test HTTP-based REST services. It's designed with testing in mind, and it integrates with any existing Java-based automation framework.

It provides a behavior-driven development (BDD)-like domain-specific language that makes creating API testing in Java simple. It also has a bunch of baked-in functionalities, which means you don’t have to code things from scratch. Bonus: If you’re like me and use the Serenity automation framework, REST-Assured integrates seamlessly with it, which means you can combine your UI and REST tests all in one framework that generates awesome reports.

Testing and validating REST services is harder in Java than it is in dynamic languages such as Ruby and Groovy. This is one more reason to use REST-Assured, since it brings the simplicity of using those languages into the Java domain.

The REST-Assured API is created so that you don't necessarily need to be an HTTP expert. 

If your team is made up mainly of Java coders, I highly recommend REST-Assured for API testing.

Postman

Some folks don’t want to deal with coding in an integrated development environment using the same language as the developers. 

For them, Postman is great for some quick and dirty API testing without worrying about the overhead of some of the other options. Postman is also a nice option for exploratory-type API testing. But it’s also powerful enough that you can create more integrated solutions if you wish.

Postman is an easy-to-use REST client, and you can get started with it quickly leveraging its Chrome plugin. There's a native version for both Mac and Windows. 

It has a very rich interface that many REST clients don’t have, making it easy to use. It also enables you to easily share your knowledge with your co-workers, because you can package up all your requests and expected responses and send them off to someone else so that he or she can take a look also. 

Casual gaming company Big Fish Games uses Postman as a collaborative tool. According to Amber Race, a software development engineer in test (SDET) at the company, one person does the research and figures out all the test cases for the API. That person then publishes that information to a wiki so that others can run the API tests and ensure that what they're doing doesn't break existing API functionality. Postman even allows you to place a button on your internal website saying, “Run in Postman,” and it automatically kicks off your Postman tests. 

If your team wants to not only test APIs but also have a tool to help automate some of your exploratory API testing efforts, Postman is a great choice. 

SoapUI

SoapUI has been around for a while now. If your teams are doing API testing only and are composed mostly of QA engineers as opposed to developers, SoapUI might be the best choice. 

SoapUI is a fully functional test tool dedicated to API testing. Rather than having to create a solution from scratch, API allows you to leverage a tool full of functionality aimed strictly at API testing. 

If for some reason you need to create a custom workflow or functionality, you can code up your solution in SoapUI using Groovy. 

If your team has complicated API testing scenarios and is weighted toward QA/test engineers, SoapUI is a good tool to try first.

JMeter

Although JMeter was created for load testing, many folks use it for functional API testing as well. 

JMeter includes all the functionality you need to test an API, plus some extra features that can be taken advantage of to enhance your API testing efforts. 

For example, JMeter can automatically work with CSV files, which allows your teams to quickly create unique parameter values for your API tests. It also integrates with Jenkins, which means you can include your API tests in your CI pipelines. 

If you plan on creating API functional tests that you would also like to leverage in your performance tests, you can kill two birds with one stone by using JMeter as your main API testing solution.

KarateDSL

KarateDSL, which is pretty new, makes creating scenarios for API-based BDD tests really simple, since unlike most BDD frameworks (Cucumber, JBehave, SpecFlow), you don’t need to write step definitions. The reason for that is that Karate has already created all the step definitions you need in order to get started testing APIs. Check out my video on KarateDSL to see how easy it is to use.

If you’re into newer technology and your team is already using Java and Cucumber, then KarateDSL might be the perfect choice for you.

Fiddler

Fiddler is a tool that allows you to monitor, manipulate, and reuse HTTP requests. Fiddler does many things that allow you to debug website issues, and with one of its many extensions, you can accomplish even more.

One of those—the APITest extension—greatly enhances Fiddler to validate the behavior of web APIs. (Validators offer a lightweight way to judge the success or failure of a test.)

For more hardcore API testing development, you can use the FiddlerCore.NET Class Library to build your API testing infrastructure. 

This is a great choice for teams that use .NET languages, since you can develop your tests using any .NET languages you wish. 

Which API tool?

There are no perfect tools. Each group has different requirements. Virtually all API test tools work pretty well and are great options, depending on your team's needs. 

There are many other API test tools available, but these are my top five. What are yours?

Continuous testing defined: Understand the basics and what it means to DevOps teams
Topics: Quality