Besides the Apache Bench and JMeter there is another utility — Yandex Tank. It’s used by our QA team and now it’s time for me to take a closer look on it to test one issue with our application running on a Kubernetes cluster.
The Yandex Tank core is written in Python. For load testing, it has few modules — [Load generators], by default it uses the Phantom written on С++, so it’s really fast. The [Telegraf] tool is a monitoring module that can connect to a testing host via SSH to run its own agent to collect metrics about CPU/mem/etc which will be displayed in Yandex.Tank during load test in real-time. The Overloader is a module to upload results to the [Yandex Overloader] or to an InfluxDB, but we will not use it here. Still, see the [Artifact uploaders].
Also, in the examples below I’ll not cover the “ammo” topic to create more complicated tests with POST, etc requests, as for me now will be enough simple GET requests. But you can find its documentation in the [Preparing requests].
Here are some things to consider when deciding whether or not API load testing is right for your application.
How do scientists demonstrate that a drug or vaccine is effective? Putting it to the test. It's your only choice. And, if you're reasonable, you'd never use medications that haven't been thoroughly tested. So, why don't you test software as thoroughly as you should?
The shift towards microservices and modular applications makes testing more important and more challenging at the same time. Learn more here.
Frequently used terms in this article: server: a single server where our application is running (or) a setup with multiple servers where our application is running. client: a server that is used for firing/sending requests to our application. Why Load testing? Load testing is the process of putting load (user requests) and then checking the response of your application(under test). It is performed to check the system’s behavior under defined load and the peak load conditions.
API endpoint when you send the get request to that URL it returns the JSON response. In this article, I am going to use postman assertions for all the examples since it is the most popular tool. But this article is not intended only for the postman tool.