What is the purpose of a load test with a tool like Locust or k6?
Options
- To find syntax errors in the source code files
- To measure throughput, latency and errors under load (Correct option)
- To check the code style of the whole project
- To test the layout of the user interface pages
Answer
Measure throughput, latency percentiles and error rates under expected and peak traffic, and find the breaking point
Why
A load test simulates many users at once to see how the system behaves: how many requests per second it handles, how slow responses get, and when errors start.
Look at p95/p99 latency (the slowest requests), not only the average, and watch CPU, database and connection pools to find the bottleneck.
Run it against a production-like environment.
Remember
Load test = how does it behave with many users?