We are firm believers in the value of automatic testing, and not only, in the life of a DevOp engineer. From the designing phase of a software product, you have to think about performance, base line functionality and fail-over scenarios. Some examples are below…

  • how many users it should support, running on a basic instance of VPS
  • what is more important for the instance of the software – CPU power, memory or access to fast storage
  • the latency for web/API calls, even when the server is going over threshold values for CPU/memory/disk usage
  • what are the gracefully failing mechanisms, what services could degrade first and still have a running application
  • draw a baseline for what is accepted usage of the whole system and what should trigger a new resource deployment (adding instances or moving calls to different sites)
  • how the monitoring systems will detect overloading and how long it will take to add resources and come back to normal base line functionality
  • is there a fail-over design in place in case your data center is down (especially for services that require 24/7 availability)

This post is about using Locust for load testing web applications or Restful API.

Locust is a testing framework for building http clients and test loading for your API or web applications, written in Python.

You define the tasks running in Python code and deploy on one or multiple machines. In code you control how many clients are launched and the frequency of the tasks.

The features we like is about writing test in plain Python, using a web-based UI that collects the results of the tests, and the fact that you can use any protocol for testing an application. 


0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published.