Today, your organization either has its own Application Program Interface (API) or is using one from one or more...
vendors. If you haven't come across an API in your application testing yet, it is only a matter of time before you do.
Think of how Amazon works. If you want to have an Amazon storefront, you don't talk to anyone at Amazon to negotiate a deal. Instead, you have your e-store code call the Amazon API to exchange data between your site and Amazon. No human interaction; it's all handled through software. But user experience is necessary for keeping customers. APIs accepted by the market enable the provider to have a readily expandable platform from which to grow a business.
Alternatively, you may be an API provider, such as Amazon. Does your API meet the needs of your customers, including quality of service and performance? Have you published sufficient documentation to enable applications to reliably call your services? Do you offer adequate error-handling protocols in case of malformed or incomplete inputs?
Any company having data or market position that can be exposed to another company has an API. And any company looking for that kind of exposure is using APIs in order to build its business. Companies must make sure that APIs meet their quality and performance standards.
In general, there are two modern methods of calling external services. The first is Simple Object Access Protocol (SOAP). SOAP provides a well-defined way of accessing services with a SOAP front end, through an HTTP transport.
The second method is simply to publish calling conventions for a RESTful or other interface to a service. Many organizations have migrated to a Representational State Transfer (REST) interface, which also enables users of an API to call the service using HTTP.
Organizations providing APIs, such as Amazon, often sell premium services through APIs, making it necessary to charge the user for additional services or features provided through the API. Additional testing may be required in order to make sure that users are obtaining the services they are paying for.
As a testing group, you know your own site meets internal standards. But the involvement of third party code, or even other services within the organization, makes the testing process more difficult. You have to test when your code changes, and you may have to test still more when your partners' codes change.
There are several tools available for testing APIs. One is provided by SmartBear, an early leader in API testing. This vendor includes SOAPUI, a SOAP endpoints functional testing tool; LoadUI, an API load testing product, and service virtualization with the ServiceV Pro tool. With these products, testers can perform a range of testing activities on application and service endpoints. In fact, API performance is important from the standpoint of both the provider and the consumer -- the provider for quality of service purposes, and the consumer to ensure that overall application goals can be met.
Alternatively, Parasoft has offered API testing for several years. SOATest lets you automate the testing of endpoints, including both APIs and SOAP interfaces. It provides functional, load and security testing, as well as test data management for interfaces. In addition, it enables testers to do end-to-end testing across multiple endpoints, such as Web services, ESBs, databases, mainframes and Web UIs.
If you're on a Microsoft platform, you can also perform API testing through Visual Studio, including the testing edition. It incorporates mostly load testing of the interface, although you can also functionally test SOAP endpoints to ensure that they expect appropriate inputs and can handle malformed data.
Testers can no longer afford to ignore APIs, whether they are published APIs or SOAP interfaces. That is the reality of customer-facing software today. Whether you are providing an API or consuming one, it is an integral part of your application infrastructure. If you don't know what API your application is using or exposing, your testing teams need to figure it out and provide appropriate functional and load testing services.
API testing makes for smooth sailing
Make sure to be fully prepared when building an API