API Performance Testing with LoadUI Pro: The Why, the How, and the Measures of Success
This post is the first in a series on API performance testing, and covers why performance testing is critical to API and company success
Speed. Performance. Reliability.
These are the characteristics we strive for when developing a truly powerful application. These are also the characteristics our customers use to judge that application.
But in today’s connected world, performance goes far beyond the applications your teams build and manage. APIs are the glue that hold the connected world together — the means by which various applications and components become interdependent. If your API is underperforming, your customers will feel the pain, which means your business will feel the pain. Ensuring the performance of your organization’s APIs is a necessity for building fast and reliable applications.
Accordingly, in our 2019 State of API Industry Survey — performance is the #1 way for organizations to measure the success of their API program, with 76% of respondents saying that performance was the leading indicator of success. And when we break down why performance matters, it becomes clear why it’s the focal point for success.
Performance is about retaining and delighting your customers
APIs have moved towards the critical path between an end-user and the service a company offers. When an API malfunctions, your application feels the effects and so do your users. As our society becomes increasingly fast-paced, even a minor delay is likely to lead users to abandon your application in favor of something else, and word of problems, failures, or availability issues can spread quickly across social media.
Improved performance helps customer retention, and the world of eCommerce gives us numerous examples.
- Walmart saw up to a 2% increase in conversions for every second of improvement in load time 1
- Fanatics shaved two seconds off its median-page load time and almost doubled mobile conversions 1
- Staples improved page load times by 1-6 seconds and improved conversions by 10% 1
You may already be familiar with the idea that page load times have a negative impact on user engagement, but think about the role an API plays in ensuring these eCommerce pages load correctly. Most eCommerce systems are not islands. Many involve API integrations that create connections between the site and a wide range of other platforms. These systems may include an internal API focused on Enterprise resource planning (ERP) to pull product data and inventory, as well as place orders for processing, or a partner API designed to pull product information directly from third-party systems.
Regular website monitoring may not capture issues with these APIs. Without explicitly monitoring API transactions, your service or page could be failing, and you won’t know until users complain. And in the world of eCommerce they aren’t just complaining about load times, but about lost orders or delays. Many retailers don’t manage their own inventory, they pay fulfillment centers to handle and ship their goods. Often, an API sends the order information to the fulfillment center and the product is shipped out to the buyer. Problems with the API, especially on those Black Fridays, may cause delays in shipping or lost orders.
Never forget that APIs are the backbone of the service(s) your company delivers. They need to perform so you can retain and delight your customers.
Performance is also about maintaining your revenue streams
Not surprisingly, performance is also a major factor for API consumers — with ease of use, performance, and service reliability being the top three factors consumers look at when evaluating APIs for adoption.2 The importance of these factors is easily illustrated with a popular application – Yelp. Millions of hungry users turn to the review app to find their neighborhood’s best restaurants and other highly rated businesses. On its own, Yelp is a powerful platform that provides an incredible amount of data, but it also depends on third parties to meet the expectations of its growing user base. When a consumer searches for a local restaurant, Yelp pulls in third-party data from the Google Maps API, letting them find restaurants located in their area.
If the Google Maps API lags or goes down due to excessive usage, the end user suffers and will likely seek another platform to find the information they’re looking for. This would be bad news for Yelp, as the user will blame the poor experience on them without caring that a third party actually caused the problem.
Basically, users expect applications to work and work quickly, regardless of the complexity or dependent API calls involved in the transaction. If the application doesn’t work, they won’t bother to look further for an explanation, they simply move on to another one. In today’s highly competitive market, that means you could lose valuable revenue due to a third-party API not meeting expectations.
If the problem persists, Yelp would likely seek alternatives to the Google Maps API – which would be costly for Google, in that it generates significant revenue from its API. In fact, APIs now represent a key revenue channel for organizations. IT leaders report that an average of 31% of their company’s revenue is generated from APIs.3
Consider that many public APIs begin internally before growing into opportunities to generate revenue or build partnerships. In that light, it’s easy to see that performance standards should be high for all APIs, even if they’re only for use within your organization. Performance is the bottom line, no matter how small the API or how many (or few) dependencies it has.
How can you ensure API performance? Load tests.
Just like you use tools to test and monitor your application, you also need to invest in the right tools for testing and monitoring your API. Whether you’re launching an API of your own, or are concerned about the third-party APIs that power your applications, you need to understand how these APIs are performing. You also need to understand the capacity of these APIs so that you can determine the volume your applications can handle and adjust as necessary. As you’ve seen above, it could be a big problem if your own or a third-party API broke or slowed down at a key moment, such as a sale or promotion.
Hopefully, you’re already using functional tests to ensure your APIs perform as intended and meet your business needs from day one. This is a critical first step, but how can you ensure your API will perform as expected in a real-world situation? And how can you ensure that your SOAP, REST, or GraphQL services can stand up to heavy traffic in high demand situations?
This is where load testing comes in. API load testing is about creating production-level load simulations within an application or system that are near to being deployed, or already used by customers. By utilizing specialized testing software, load testing allows testers to answer questions like “Is my system doing what I expect under these conditions?”, “How will my application respond when a failure occurs?”, and “Is my application’s performance good enough?” And API load testing tools allow you to manage important factors within the load test like test length and failure conditions, plus how virtual load will impact your API to create realistic scenarios.
Make load testing simple with LoadUI Pro
Fortunately, with the right tools, it’s not necessary for load testing to add a significant amount of bandwidth to your API testing workload – in fact one of our tools, LoadUI Pro, is designed to simplify the process even further. You can reuse functional test scripts for load testing with just a few clicks of a mouse, allowing you to seamlessly add load testing to your existing functional testing process.
How LoadUI Pro does that … well that’s for the next post. If you can’t wait till then, by all means download a free trial and check it out for yourself. But we’ll be back next week for part 2 of our Performance Testing blog series where we’ll start to dive into LoadUI Pro and its features and functions that allow you to create, manage, and execute load, stress, and endurance tests right inside your CI/CD pipeline with just a few clicks.
Till then – Happy Testing
1. Akamai – The State of Online Retail Performance (2017)
2. SmartBear – The State of API 2019 Report
3. MuleSoft – 2020 Connectivity Benchmark Report
This post was originally published at https://smartbear.com/blog/test-and-monitor/measuring-api-performance-with-loadui-pro/