Know Your Tool Options for API Testing and Monitoring

This is part three of our API testing series. In part 2 we looked at how API testing workflows help teams figure out where to start, and know when they're done.

Many software testers get by with a small toolset — a few good browsers and the application's built-in developer tools, something to run SQL queries through, a tool to connect as a user to the test server, and perhaps an HTTP inspector if they want to get fancy. Testing an API requires expanding on that. Picking a toolset is a bit like shopping for toothpaste. First, you walk through the aisle, noticing (and being overwhelmed by) all of the options and packaging. After a while, you notice that, despite the claims of uniqueness, most of the products do many of the same things.

While new tools emerge and others go out of fashion every day, we can at least make a list of what is relevant right now. Here are some suggestions to help smooth and speed up the process of choosing an API testing tool.

SmartBear Ready API

Ready API is a commercial suite of five different tools from SmartBear — SoapUI Pro, LoadUI Pro, Secure, ServiceV, and API Monitoring in AlertSite. SoapUI Pro is the classic API tester's tool, which can record, save results from, and rerun (along with explore) functional testing of REST, SOAP, and web service-based APIs. In other words, its name (which might lead you to believe that it's strictly for SOAP-based APIs) belies its function to some extent. You can use this tool to perform single API calls, build test suites, and run tests from a Continuous Integration system with its command line tools. SoapUI Pro can also take in description files from Swagger or RESTful API Modeling Language (RAML) to speed up the creation of API tests. LoadUI Pro is a load and performance testing tool focused on APIs. Testers can make calls to an API with varying amounts of data and users in order to test its scalability and then collect data to use in a performance analysis. Secure is a security testing tool designed to work with APIs. ServiceV helps testers and developers create, deploy, and manage virtual API test environments. You can use AlertSite in your development, test, or production environments to discover information about how an API is being used.

Ready API offers a free 30-day trial. For pricing information you need to contact the SmartBear sales team. (The junior member of the family, SoapUI "non-pro," is available for no fee.). Here is a link to our review of SoapUI.

Postman

Postman was once a freeware extension for Google's Chrome web browser. In 2016, this tool became commercially available as a standalone API testing product. In its most basic version, Postman is a tool for storing and performing calls to an API. Calls can be chained together with each being predicated on earlier responses. Each call made to an API is stored chronologically and can be referred to later. The paid versions of Postman offer the ability to create collections of tests that can be accessed across teams, have tools for collaboration in API testing, monitoring tools, and product support.

Postman has a graduated pricing model. There is a free version, Postman Pro is $8 per month per user or $6.25 per user per month if purchased annually, and you'll need to contact the Postman sales team to learn the pricing for the Enterprise version. You can also download a 30-day free trial of Pro. A monitoring add-on is available for Pro and Enterprise. Here is a link to our review of Postman.

Airborne

Airborne is a free and open source Ruby library for testing an API. Since this is a programming interface, and not a tool driven through a user interface, testers can do just about anything they want with it. There are many different ways to make assertions on the response to an API call — expect_json, expect_json_types, and expect_status, for example. Tests built in airborne are written in the rspec convention. Anyone familiar with development and testing in the Ruby programming language should have a very small learning curve. Also, because this is a programming library and not a UI driven tool, hooking tests built in Airborne up to a continuous integration system should be trivial.

This tool library is free, and you can install it through the Ruby gem utility. If you don't know Ruby, you can learn enough to be competent very quickly using my colleague Matt Heusser's quick and dirty introduction to Ruby. Here is a link to our review of Airbrone.

Command Line Tools

HTTPie and Curl are both popular tools for testing APIs. Both of these tools are open source and free. These tools are designed to send one call to an API at a time. While they're not particularly useful for designing and building high-volume test automation that can be run in a build system, they're useful for exploring an API during the development process or running tests to isolate potential problems. Both support basic authentication or you can save tokens in a file for something more complex. As these are command line tools, you can probably achieve a modicum of test automation through scripting. Here is a link to our review of some command line tools.

API Science

API Science is a commercial tool to facilitate testing APIs in production. This tool offers quick setup, monitoring of third-party APIs, reporting, alerting, and a dashboard where you can see all relevant information about an API in one place.

API Science has a graduated pricing model based on the number of users and API calls that can be captured. Prices start at $29 per month. Each version has available free 30-day trials. Here is a link to our review of API Science.

API Metrics

API Metrics is another tool designed to facilitate monitoring and testing in production, but this one focuses on performance. Rather than virtualization, API Metrics runs real authenticated calls with data to a running API and collects data to help development teams understand performance.

API Metrics offers self-serve, supported, and managed levels. Contact the API Metrics sales team to learn more about pricing. Here is a link to our review of API Metrics.

Getting Started

Talk about the problem that needs to be solved before diving into a tool or testing solution. Each of these API testing tools shine in certain areas and struggle in others. Every development group will need one particular piece of functionality — such as CI integration, ability to perform a single test quickly, or collecting statistics about performance — more than others.

The next set of articles in this series will cover in detail how to work with each of these products from installation to the building a test suite.

Be sure to read the next Testing article: What's Next in API Testing

 

Comments (0)