REST APIs make up about 83% of all APIs currently in use. Performance testing of APIs is becoming more and more critical to ensure overall system performance. Let's take a look at how we can use the k6 open source load testing tool to performance test REST API endpoints.
In the recently published Visual Studio 2019 preview release notes, Microsoft stated that this will be the last version of Visual Studio with load testing features. They recommend that their customers seek out alternative load testing tools. In a massive oversight, they completely forgot to include Load Impact in their list of alternatives! ;)
Sure, Load Impact provides a SaaS application for performance testing websites, web apps and APIs. And we have some industry-first capabilities, such as our recently announced Load Impact Insights Performance Alerts. And, the goal is to enable you to deliver higher performing software to market faster and at lower cost.
Automated results analysis makes it easier to interpret your load test results and speeds up the process of finding and fixing performance issues. Load Impact Insights Performance Alerts pinpoint performance issues in your system under test and highlight test script issues.
Here in the U.S. it’s almost Thanksgiving. That means, of course, that Black Friday and Cyber Monday are not far behind. Black Friday is still a very big day for retail stores and ecommerce sites. But, as predicted, Black Friday has become “Black Fri-month” as retailers have been starting their promotions earlier and earlier to try to get a jump on the competition.
Understanding your load testing results can be a challenge. Automated results analysis can really cut down on the time you spend poring over your test data to figure out where the bottlenecks are. In our user survey, we found that automated results analysis is the second most wanted capability for a load testing solution.
Successful performance testing of websites, web apps and APIs requires planning. You may want to jump in, pick a load testing tool and start testing, but let’s take some time to establish our methodology first. A software performance testing methodology requires a number of steps. Let’s break them down into 3 phases:
So, you want to load test your website or web application to see if it will handle the expected normal and peak user traffic. How can you create a realistic test script that captures a typical user journey in your app?
If you have an API, you should be load testing it. You should test it frequently and consistently.
With that out of the way, here’s why: API consumers are like your end users of a website or app. Yet unlike sites or apps, APIs don’t have front ends or usage paths to follow. Instead, assuming you’ve built the right capabilities into your API, everything comes down to performance.
So basic testing of your API is fine when you want to achieve “works on my machine”-level performance. But that isn’t enough for professional use.
Instead, you should be testing your API’s performance under load - seeing how it will perform under the stress of multiple consumers. In other words, your REST API shouldn’t spend any time resting at all.