Heavyrain is loadtest/stresstest tool made with PHP.
You can test any HTTP services using scenario written in PHP.
- PHP 8.1.0+ (web and runner instance)
- Any HTTP(S) service
- Main target is JSON API server.
- NOTE: Currently HTTP/3 is not supported due to lack of implementation of curl.
You may add .gitignore lines below.
/heavyrain.phar
/_heavyrain.stub.php
$ curl -fLO https://github.com/heavyrain-php/heavyrain/releases/download/v0.0.1/heavyrain.phar
$ php heavyrain.phar help
# Generate stub file for static analysis and IDE.
$ php heavyrain.phar generate:stub
$ phive install https://github.com/heavyrain-php/heavyrain.git
$ ./tools/heavyrain help
# Generate stub file for static analysis and IDE.
$ ./tools/heavyrain generate:stub
$ composer require --dev heavyrain/heavyrain
$ ./vendor/bin/heavyrain help
# You may not do generate stub file because actual files exist in vendor.
$ mkdir scenarios
$ touch scenarios/sample_scenario.php
<?php
// scenarios/sample_scenario.php
declare(strict_types=1);
use Heavyrain\Contracts\ClientInterface;
// You should use `static function` for better performance.
return static function (ClientInterface $cl): void {
$cl->get('/')->assertBodyContains('hello');
};
TODO
$ php heavyrain.phar run scenarios/sample_scenario.php http://localhost:8080/
TODO
Anytime you can contribute to this repository.
$ git clone https://github.com/heavyrain-php/heavyrain.git
$ cd heavyrain
$ composer install
$ composer ci
See LICENSE.