API Load Testing: A Beginner's Guide
by Nicole van der Hoeven
This book is intended to be a reference book, so while I would recommend that complete beginners to load testing read it cover to cover, I encourage readers with some experience in testing to flip to sections of interest, skip some altogether, go back and forth, and generally use it like the guidebook that it is. Here’s a summary of what we’ll go over.
This book is split into 7 major sections.
In the Introduction, we’ll start with an explanation of what exactly an API is and why it’s even worth testing. To help you figure out whether this is something that might apply to your situation, check out the sections on what API load testing can’t do for you and what it can.
Then we’ll jump straight into Planning for your load testing. You’ll learn how to formulate nonfunctional requirements that are SMART to make it clear up front what kind of behaviour you expect from your application under load. You’ll set your testing scope and entry criteria, learn how to create a workload model that will most closely resemble production, set up monitoring on your servers, stub out components, and design test scenarios that will recreate the situations your application is most likely to find itself in.
In Scripting, we’ll discuss how to choose among the most popular and robust tools on the market today. I won’t discuss how to script in every tool, but I will cover JMeter and Gatling basics and then point you to advanced resources. We’ll also talk about some tips for how to script so that your tests are as realistic as possible and simulate real users’ behaviour.
Then it will be time to start Execution. We’ll discuss the benefits of having execution checklists for larger teams, a run list to keep track of test purposes and results, what to monitor during runtime, and how long you should run your tests for.
Analyzing Results and Reporting is the part of the testing process that management will pay most attention to. We’ll go over which performance metrics you want to pay attention to, how each one can help you identify a performance bottleneck, and tips for presenting this to key stakeholders.
But you’re not done yet— we’ll also talk about the benefits of Incorporating your API Load Testing into Your Continuous Integration Framework so that you can set it up yourself and reap the benefits of having every release load tested. We’ll emphasise the continuous testing part of the equation with an argument for testing in production.
We’ll wrap up with Other Considerations for API Load Testing, going over other tests you can run to complement it and what else we can do to get a better idea of overall system performance.
Let's get started!