← 全部工具

lgamorim/api-stressor

热度 75 更新于 开发与构建

A CLI stress tester for HTTP APIs — three load-scheduling strategies, multi-payload rotation, and detailed success/failure/latency reporting.

githubauto-collected

安装

暂未验证可直接使用的安装命令,请查看项目官方文档或 Release。

api-stressor

A command-line tool for stress testing HTTP API endpoints. It sends repeated requests at a configurable rate using a JSON payload file, then reports success, failure, and response-time statistics.

Installation

Download the latest release for your platform from GitHub Releases:

| Platform | Archive | |----------|---------| | Windows x64 | stressor-{version}-win-x64.zip | | Linux x64 | stressor-{version}-linux-x64.zip |

Extract the zip and run the executable. Self-contained builds include the .NET runtime — you do not need the SDK installed on the target machine.

# Windows
./stressor.exe --help
# Linux
chmod +x stressor
./stressor --help

Running from source

Prerequisites

  • .NET 10 SDK or later

Running the app

From the repository root:

dotnet run --project src/Stressor.App -- `
  [--config <path-to-scenario.json>] `
  --url <endpoint-url> `
  --payload <path-to-payload.json> `
  --requests <count> `
  --interval <duration> `
  [--method <http-verb>] `
  [--auth <authorization-header-value>] `
  [--header <name-value>] `
  [--headers <path-to-headers.json>] `
  [--expect-status <code>] `
  [--report <path-to-report.json>] `

[--batch <count] [--timeout <duration] [--cycles <count] [--duration <duration] [--cycle-interval <duration] [--progress] [--dry-run] [--verbose <failures|full]


You can also build and run the executable directly:

dotnet build src/Stressor.App ./src/Stressor.App/bin/Debug/net10.0/stressor.exe --url ... --payload ... --requests ... --interval ...


## Getting help

Pass `--help` (or `-h`) to print usage information. This includes all command-line options, examples, supported HTTP methods, interval formats, authentication notes, and exit codes. No other arguments are required.

Pass `--version` to print the application version.