Locust is an open-source, developer-friendly load testing framework written in Python. It allows users to define test scenarios as regular Python code using `User` classes with `@task` decorators and configurable wait times. The system supports HTTP and other protocols via built-in clients (HttpUser, FastHttpUser) and extensible contrib modules (MQTT, gRPC, Postgres, etc.). It provides a real-time web UI built with React/Redux/MUI for controlling tests and viewing statistics, a headless CLI mode for CI/CD integration, and a distributed architecture using ZMQ for master/worker coordination. The framework collects detailed per-request metrics (response times, percentiles, error rates) and can export CSV, HTML, and JSON reports. It also integrates with OpenTelemetry for observability. The codebase is well-structured with a clean event-driven architecture, extensive test coverage, and a plugin system for custom extensions.
Apache JMeter is a mature, open-source performance and load testing application written primarily in Java with some Kotlin. It simulates heavy loads on servers, networks, or objects to analyze overall performance under different load types. The architecture is modular: a core engine (StandardJMeterEngine) executes test plans composed of a tree of TestElements (samplers, controllers, timers, assertions, listeners). Protocols are implemented as separate modules (HTTP, FTP, JDBC, JMS, LDAP, TCP, etc.), each providing samplers and GUI components. The system supports both GUI (Swing) and non-GUI (command-line) modes, distributed testing via RMI, and real-time metrics export to InfluxDB or Graphite. Key entry points include the NewDriver launcher, the JMeterEngine interface, and the TestPlan tree. Data flows involve sample generation by samplers, processing by assertions and extractors, and collection by listeners/visualizers, with results written to CSV/XML files or streamed to backends. External dependencies include Apache HttpClient, Jodd, jsoup, XStream, Apache Commons Math, and various protocol-specific libraries.
Artillery is a cloud-scale load testing and functional testing framework for backend services and APIs. It supports multiple protocols (HTTP, WebSocket, Socket.IO, Playwright, PostHog) through a plugin-based engine architecture. The system is primarily a CLI tool (built on oclif) that executes YAML/JSON test scripts defining virtual user flows with configurable arrival phases, payloads, and assertions. It provides distributed execution across local worker threads, AWS Lambda, AWS ECS/Fargate, and Azure ACI, with a bill-of-materials (BOM) system that bundles test dependencies for cloud workers. Metrics are aggregated via a custom Simple Statistics Measurement System (SSMS) supporting counters, histograms (DDSketch), and rates, and can be published to Datadog, CloudWatch, Prometheus, OpenTelemetry, Splunk, New Relic, and other observability platforms. The codebase is a monorepo managed with Turborepo, containing the core runner, platform integrations, first-party plugins (expect, ensure, apdex, slack, fake-data, metrics-by-endpoint, publish-metrics, memory-inspector), and shared type definitions. Key entry points include the `artillery` binary (`packages/artillery/bin/run`), the core runner (`packages/artillery/lib/core/runner.ts`), and platform launchers (`packages/artillery/lib/launch-platform.ts`). External dependencies include AWS SDK, Azure SDK, Playwright, got (HTTP client), and various metric publishing SDKs. The architecture is event-driven, using EventEmitter for lifecycle events and plugin hooks, with a global `global.artillery` object for shared state.