rampa

Async Python load testing, inspired by k6.

Write an async scenario function, run it, get request metrics with percentiles, checks, thresholds, and correct exit codes.

With uvx run installed:

$ uvx rampa --help

Then run it from the terminal:

$ uvx rampa run load_test.py
$ uvx rampa run load_test.py --vus 10 --duration 30s
$ uvx rampa check load_test.py

With uvx installed:

$ claude mcp add rampa -- uvx rampa-mcp

Your first load test

import asyncio
import rampa

@rampa.scenario(executor="constant-vus", vus=10, duration="30s")
async def default(worker: rampa.Worker) -> None:
    resp = await worker.http.get("https://httpbin.org/get")
    worker.check(resp, {"status is 200": lambda r: r.status == 200})
$ rampa run load_test.py
Quickstart

Write and run your first scenario in 60 seconds.

Getting Started
CLI

rampa run, rampa check, rampa doctor from the terminal.

CLI
Library

Executors, metrics, thresholds, and the Python API.

Library
pytest

Run load tests inside your test suite with @pytest.mark.rampa_scenario.

pytest Plugin
MCP

Start, stop, and query load tests from AI agents.

MCP Server
Development

Contributing, benchmarks, and architecture.

Development

What you get

Six executor types

Closed-model (VU-based) and open-model (arrival-rate) scheduling, matching k6’s executor vocabulary.

Executor

Model

Use when

constant-vus

Closed

Fixed concurrency for a duration

ramping-vus

Closed

Ramp concurrency up/down through stages

shared-iterations

Closed

Run exactly N total iterations

per-vu-iterations

Closed

Each VU runs exactly N iterations

constant-arrival-rate

Open

Maintain a fixed request rate

ramping-arrival-rate

Open

Ramp request rate through stages

Automatic HTTP metrics

Every HTTP request auto-emits timing metrics with per-phase decomposition (blocked, connecting, sending, waiting, receiving), failure classification, and data transfer counters.

Threshold expressions

config = rampa.Config(
    thresholds={
        "http_req_duration": ["p(95)<500", "avg<200"],
        "http_req_failed": ["rate<0.01"],
    },
)

Threshold breaches produce exit code 1 for CI integration.

Multiple frontends and outputs

  • CLIrampa run with --progress live status or --tui dashboard

  • TUI — interactive Textual dashboard with live metrics and keyboard control

  • pytest plugin@pytest.mark.rampa_scenario for test suites

  • unittest mixinRampaTestCase for unittest integration

  • MCP serverrampa-mcp for AI agent integration

  • Output backends — CSV, InfluxDB, Prometheus, OTEL, webhooks via --output

  • CI comparisonpython -m rampa.ci.compare for benchmark diffs