A console-based load testing tool for web APIs.
- Configurable concurrent request execution
- Statistics (latency, status codes, throughput, error rates)
- Real-time progress indicator
- .NET 8 SDK or later
- Windows, Linux, or macOS (any OS supported by .NET 8)
-
Build and package the tool:
cd src/Raptor.Cli dotnet pack -c Release -
Install globally from the generated package:
dotnet tool install --global --add-source ./nupkg Raptor.Cli
-
Verify installation:
raptor --help
To update an existing installation:
cd src/Raptor.Cli
dotnet pack -c Release
dotnet tool update --global --add-source ./nupkg Raptor.Clidotnet tool uninstall --global Raptor.CliAfter installation, use the raptor command from any directory:
raptor --url https://api.example.com/v1/users --concurrency 10 --duration 30Or run directly from source:
cd src/Raptor.Cli
dotnet run -- --url https://api.example.com/v1/users --concurrency 10 --duration 30-
--url <url>- Target URL to load test (e.g.,https://api.example.com/users) -
--concurrency <n>- Number of concurrent requests to send (e.g.,10,50,100)- Range: 1 to 65,535
- Default: 1
-
--duration <seconds>OR--requests <n>- Specify either:--duration <seconds>- Run for a specific duration (e.g.,--duration 60runs for 60 seconds)- Range: 1 to 65,535 seconds
--requests <n>- Run until a specific number of requests complete (e.g.,--requests 1000)- Range: 1 to 65,535 requests
Note: Use either
--durationor--requests, not both.
-
--method <method>- HTTP method (GET, POST, PUT, DELETE). Default:GET- Case-insensitive (GET, get, Get all work)
-
--body <json>- Request body for POST/PUT requests (must be valid JSON)--body '{"name":"John","email":"john@example.com"}' -
--headers <key:value,...>- Custom HTTP headers as comma or semicolon-separated key:value pairs- Headers are automatically trimmed (whitespace around keys/values is removed)
- Supports both comma (
,) and semicolon (;) as delimiters
--headers "Content-Type:application/json,Authorization:Bearer token123" # or --headers "Content-Type:application/json;Authorization:Bearer token123"
-
--helpor-h- Display usage information- Also displayed when running
raptorwith no arguments
- Also displayed when running
Run a GET request load test for 30 seconds with 10 concurrent requests:
raptor --url https://api.example.com/v1/users --concurrency 10 --duration 30Run until 1000 requests complete:
raptor --url https://api.example.com/v1/users --concurrency 50 --requests 1000Send POST requests with a JSON payload:
raptor --url https://api.example.com/v1/users \
--method POST \
--concurrency 20 \
--duration 60 \
--body '{"name":"John","email":"john@example.com"}' \
--headers "Content-Type:application/json,Authorization:Bearer token123"raptor --help
# or
raptor -h
# or simply
raptorRaptor displays statistics including:
- Total requests completed
- Successful requests count
- Error count
- Test duration
- Requests per second (RPS)
- Response time percentiles (P50, P95, P99)
- Minimum, maximum, and average latency
- Status code distribution with percentages
=== Load Test Results ===
Summary:
Total Requests: 1,000
Successful: 995
Errors: 5
Duration: 30.00s
Requests/sec: 33.33
Latency (ms):
Min: 1284
Max: 1381
Avg: 1326
P50: 1324
P95: 1328
P99: 1328
Status Codes:
200: 995 (99.5%)
500: 5 (0.5%)
Important: The tool stores a limited number of results for latency percentile calculations. While TotalRequests counts all requests made, percentiles (P50, P95, P99) are calculated from stored samples. This ensures memory efficiency while maintaining statistical accuracy for typical load tests.
- Total Requests: Counts all requests made during the test
- Latency Percentiles: Calculated from a subset of stored results (capacity-limited)
- Status Codes: Tracks all status codes encountered
- Error Count: Counts all errors (network failures, timeouts, etc.)
0: Success (test completed or cancelled gracefully)1: Error (invalid arguments or unexpected error)
Press Ctrl+C to stop the test early. Final statistics will be displayed and the tool exits with code 0 (success).
If you provide invalid arguments, the tool will display an error message and show usage information. Common issues:
- Missing required arguments (
--url,--concurrency,--durationor--requests) - Invalid values (non-numeric, zero, or negative numbers)
- Values exceeding maximum limits (65,535)
- Specifying both
--durationand--requests(mutually exclusive)
The tool provides clear error messages for:
- Missing option values
- Invalid numeric values
- Unsupported HTTP methods
- Invalid configuration combinations
This project is licensed under the MIT license.