Esta página se muestra en inglés. Una traducción al español está en curso.
ConfigsApr 12, 2026·2 min de lectura

Locust — Scalable Load Testing in Pure Python

Locust is an open-source load testing tool where you define user behavior in plain Python code. Distributed, scalable, and with a real-time web UI for monitoring. No DSL to learn — just write Python.

Introducción

Locust is an open-source load testing tool where you define user behavior in plain Python code. No XML, no DSL — just Python classes and decorators. Features a real-time web UI, distributed testing across multiple machines, and easy CI/CD integration.

What Locust Does

  • Python test scripts — define user behavior as classes
  • Web UI — real-time charts, start/stop, user count control
  • Distributed — master + workers for massive scale
  • Headless mode — for CI/CD
  • CSV/JSON output — export results
  • Custom clients — test gRPC, WebSocket, MQTT, databases
  • Events — hook into test lifecycle
  • Task weighting@task(weight) for traffic distribution

Comparison

Tool Language UI Distributed
Locust Python Web UI Master/worker
k6 JavaScript CLI k6-operator
JMeter Java/GUI Desktop Servers
Vegeta Go CLI No
wrk C CLI No

FAQ

Q: How many concurrent users can it test? A: A single machine handles thousands of users (gevent coroutines); distributed setups easily reach tens of thousands. Not as efficient per-machine as k6, but Python makes scripting more flexible.

Q: Compared to k6? A: Locust uses Python (more flexible, can directly call any Python library); k6 uses JS (Go runtime is more efficient). Pick based on team language preference.

Sources

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.

Activos relacionados